Skip to content

Instantly share code, notes, and snippets.

@arwagner
Created November 29, 2011 03:17
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 arwagner/1403218 to your computer and use it in GitHub Desktop.
Save arwagner/1403218 to your computer and use it in GitHub Desktop.
class Foo
def initialize
@x = 3
end
def fiddle &block
instance_eval &block
end
end
puts Foo.new.fiddle { @x }
x = lambda { @x }
puts Foo.new.fiddle &x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment