Jordan Sissel created JRUBY-6538:
------------------------------------
Summary: 'obj =~ thing' is not the same as obj.send(:!~, thing)
Key: JRUBY-6538
URL: https://jira.codehaus.org/browse/JRUBY-6538
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.6.7
Reporter: Jordan Sissel
Assignee: Thomas E Enebo
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:
{noformat}
% 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
{noformat}
In the above example, 'Foo.new !~ /bar/' should have returned /bar/, not true.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email