Skip to content

Instantly share code, notes, and snippets.

@dacc
Created May 18, 2010 02:02
Show Gist options
  • Save dacc/404505 to your computer and use it in GitHub Desktop.
Save dacc/404505 to your computer and use it in GitHub Desktop.
ruby-1.9.1-p378 > i = 2
=> 2
ruby-1.9.1-p378 > p = Proc.new { i }
=> #<Proc:0x000001009bec10@(irb):44>
ruby-1.9.1-p378 > p.call
=> 2
ruby-1.9.1-p378 > i = 3
=> 3
ruby-1.9.1-p378 > p.call
=> 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment