Skip to content

Instantly share code, notes, and snippets.

@jperras
Created September 24, 2015 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jperras/0fe67047c47989f4cb93 to your computer and use it in GitHub Desktop.
Save jperras/0fe67047c47989f4cb93 to your computer and use it in GitHub Desktop.
Ruby… where you have to know internal parser logic for symbol table construction & lookup to determine what 7 lines of code produces.
def foo(bar)
print bar
end
foo = 42
foo foo
# Any guesses as to what this will do? :)
@jperras
Copy link
Author

jperras commented Sep 24, 2015

Thanks to @ehaas who stumbled upon this by accident and posed a great little brain teaser in our @fictivekin IRC server.

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