-
-
Save jonleung/160e1db7b3724c71b541 to your computer and use it in GitHub Desktop.
Evaluating to false
This file contains 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 A | |
def ==(comp) | |
false | |
end | |
end | |
a = A.new | |
if a | |
puts "'a' evaluated to true" | |
else | |
puts "'a' evaluated to false" | |
end | |
#=> 'a' evaluated to true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment