Incompatible behavior for ||= in Hashes
---------------------------------------
Key: JRUBY-1715
URL: http://jira.codehaus.org/browse/JRUBY-1715
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.x
Environment: Latest JRuby 1.1b1
Reporter: Vladimir Sizikov
Consider the example:
class MyHash < Hash
def []= (key, value)
true
end
end
a = MyHash.new
puts (a['b'] ||= {})
In MRI it prints nothing.
In JRuby prints true.
This leads to some gem failures, like rio.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.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