Skip to content

Instantly share code, notes, and snippets.

@adaedra
Created January 15, 2013 23:33
Show Gist options
  • Save adaedra/4543162 to your computer and use it in GitHub Desktop.
Save adaedra/4543162 to your computer and use it in GitHub Desktop.
Ruby fun :D
def false.to_s
"true"
end
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 %
@Ezveus
Copy link

Ezveus commented Jan 16, 2013

Tu devrais avoir honte de même penser à des choses pareilles...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment