Created
January 15, 2013 23:33
-
-
Save adaedra/4543162 to your computer and use it in GitHub Desktop.
Ruby fun :D
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
def false.to_s | |
"true" | |
end |
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
adaedra@pegasus % irb -r'./foo' | |
irb(main):001:0> false | |
=> true | |
irb(main):002:0> true | |
=> true | |
irb(main):003:0> false && false | |
=> true | |
irb(main):004:0> false && true | |
=> true | |
irb(main):005:0> false || false | |
=> true | |
irb(main):006:0> !false | |
=> true | |
irb(main):007:0> puts "true" if false | |
=> nil | |
irb(main):008:0> puts "true" if true | |
true | |
=> nil | |
irb(main):009:0> exit | |
adaedra@pegasus % |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tu devrais avoir honte de même penser à des choses pareilles...