Skip to content

Instantly share code, notes, and snippets.

@masquaremo
Created September 11, 2013 13:40
Show Gist options
  • Save masquaremo/6523771 to your computer and use it in GitHub Desktop.
Save masquaremo/6523771 to your computer and use it in GitHub Desktop.
数値・文字・文字列リテラルをつかわずに、"Hello World"と標準出力に出力する。 (カッコ悪いバージョン)
one = [nil].size
two = one + one
three = two + one
four = three + one
five = four + one
six = five + one
seven = six + one
eight = seven + one
nine = eight + one
ten = nine + one
str = String.new
str << ((four << four) | eight)
str << ((six << four) | five)
str << ((six << four) | (ten + two))
str << ((six << four) | (ten + two))
str << ((six << four) | (ten + five))
str << (two << four)
str << ((five << four) | seven)
str << ((six << four) | (ten + five))
str << ((seven << four) | two)
str << ((six << four) | (ten + two))
str << ((six << four) | four)
print str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment