Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Parser, Ruby 1.9.2
-
Labels:None
-
Number of attachments :
Description
I noticed this while working on some custom library code to implement '!~'
Patch to add this to RubySpec, which currently fails in JRuby 1.6.7: https://github.com/jruby/rubyspec/pull/2
irb session showing the failure:
% JRUBY_OPTS=--1.9 irb >> JRUBY_VERSION + " " + JRUBY_REVISION => "1.6.7 3e82bc8" >> class Foo; def !~(val); return val; end; end => nil >> Foo.new.send(:"!~", /bar/) => /bar/ >> Foo.new !~ /bar/ => true
In the above example, 'Foo.new !~ /bar/' should have returned /bar/, not true.
Activity
Charles Oliver Nutter
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Fix Version/s | JRuby 1.7 [ 17049 ] | |
| Component/s | Parser [ 12229 ] | |
| Component/s | Ruby 1.9.2 [ 13724 ] |
Hiro Asari
made changes -
| Summary | 'obj =~ thing' is not the same as obj.send(:!~, thing) | 'obj !~ thing' is not the same as obj.send(:!~, thing) |
Hiro Asari
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Assignee | Thomas E Enebo [ enebo ] | Charles Oliver Nutter [ headius ] |
| Resolution | Fixed [ 1 ] |