Skip to content

Instantly share code, notes, and snippets.

@ryantm
Created January 29, 2014 06:12
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 ryantm/8682783 to your computer and use it in GitHub Desktop.
Save ryantm/8682783 to your computer and use it in GitHub Desktop.
a = 1
puts local_variables.inspect #=> [:a]
proc { |;a|
puts local_variables.inspect #=> [:a,:a,:a]
}.call
puts local_variables.inspect #=> []
proc { |;b|
puts local_variables.inspect #=> [:b]
}.call
ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment