Created
January 4, 2010 05:50
-
-
Save jimweirich/268334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FL | |
def initialize(array) | |
@ary = array | |
end | |
def ==(array) | |
to_ary == array | |
end | |
def to_ary | |
@ary | |
end | |
end | |
# This is true in both MRI and JRuby: | |
p(['a'] == FL.new(['a'])) | |
# Oddly, this is true only in MRI, it is false in JRuby | |
p([['a']] == [FL.new(['a'])]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment