[1.9] #equal? is incorrect and behaves more like ==
---------------------------------------------------

                 Key: JRUBY-4016
                 URL: http://jira.codehaus.org/browse/JRUBY-4016
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.3.1
         Environment: jruby 1.4.0dev (ruby 1.8.7 patchlevel 174) (2009-09-28 
b03c7b4) (Java HotSpot(TM) Client VM 1.6.0_03) [i386-java]
            Reporter: Vladimir Sizikov
            Priority: Critical


Take a look:

#> jruby --1.9 -ve "puts 'vvs'.equal?('vvs')"
jruby 1.4.0dev (ruby 1.9.2dev trunk 24787) (2009-09-28 b03c7b4) (Java 
HotSpot(TM) Client VM 1.6.0_03) [i386-java]
true

#>jruby --1.9 -ve "puts [1, 2, 3].equal?([1, 2, 3])"
jruby 1.4.0dev (ruby 1.9.2dev trunk 24787) (2009-09-28 b03c7b4) (Java 
HotSpot(TM) Client VM 1.6.0_03) [i386-java]
true

For other classes too. But equal? calls above should return false in these 
cases. In both 1.8 and 1.9, equal? means object identity.

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