LoginSignup
0

More than 5 years have passed since last update.

a == 1 && a == 2 && a == 3にするRubyスクリプト(おふざけ編)

Posted at

文字列

p !!DATA.read # => true
__END__
a == 1 && a == 2 && a == 3

例外

begin
  p a == 1 && a == 2 && a == 3
rescue
  p true
end

FalseClass

def false.inspect;true;end
a=1
p a == 1 && a == 2 && a == 3 # => true

標準出力

def p(m);puts !m;end
a=1
p a == 1 && a == 2 && a == 3 # => true

真面目編

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0