Array#== doesn't use custom to_ary method for RHS arguments
-----------------------------------------------------------

                 Key: JRUBY-1148
                 URL: http://jira.codehaus.org/browse/JRUBY-1148
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.0.0RC3
         Environment: Solaris 10, Java 1.5, JRuby 2007-06-14 rev 3876
            Reporter: Daniel Berger


Array#== is supposed to use an object's to_ary method if it has one for 
purposes of Array#==:
{noformat}
class Foo
   def to_ary
      [1,2,3]
   end
end

f = Foo.new

[1,2,3] == f # Should be true
{noformat}
This is also a bug in MRI 1.8.6 p36. See the slightly mis-titled bug #11585 on 
RubyForge for more info.

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