Hashcodes for Hash objects break compatability with MRI
-------------------------------------------------------

                 Key: JRUBY-3682
                 URL: http://jira.codehaus.org/browse/JRUBY-3682
             Project: JRuby
          Issue Type: Bug
         Environment: Linux(Ubuntu)
            Reporter: Tyler Jennings
            Assignee: Thomas E Enebo


In jruby trunk: 

irb(main):003:0> {}.hash == {}.hash
=> false

In MRI 1.8.7: 

irb(main):008:0> {}.hash == {}.hash
=> true

This inconsistency breaks things in odd places, like some memoization libraries 
in Rails.  Using one of these libraries in JRuby for a method that takes a hash 
as a parameter causes a new cache to be generated for every call to the method 
even when the parameters are identical.  The inevitable result is an 
OutOfMemoryException.

-- 
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


Reply via email to