Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.0.0RC3
-
Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Solaris 10, Java 1.5, JRuby 2007-06-14 rev 3876
-
Number of attachments :
Description
Array#== is supposed to use an object's to_ary method if it has one for purposes of Array#==:
class Foo
def to_ary
[1,2,3]
end
end
f = Foo.new
[1,2,3] == f # Should be true
This is also a bug in MRI 1.8.6 p36. See the slightly mis-titled bug #11585 on RubyForge for more info.
Shall it fail with NoMethodError or silently return false when to_ary not supplied for non Array arguments ?