Skip to content

Instantly share code, notes, and snippets.

/foo.rb Secret

Created February 18, 2013 12:41
Show Gist options
  • Save anonymous/5dacaed5cea4e595ee9f to your computer and use it in GitHub Desktop.
Save anonymous/5dacaed5cea4e595ee9f to your computer and use it in GitHub Desktop.
def instrument
puts "before"
yield
puts "after"
end
instrument { puts "foo" } # works
myProc = Proc.new { puts "foo" }
instrument myProc # doesn't work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment