Skip to content

Instantly share code, notes, and snippets.

@benhoskings
Created October 9, 2008 09:02
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 benhoskings/15728 to your computer and use it in GitHub Desktop.
Save benhoskings/15728 to your computer and use it in GitHub Desktop.
class Lol
def where_am_i
"within #{self.class.to_s}"
end
def winproc
proc { "lol from #{where_am_i}" }
end
end
def where_am_i
'top level'
end
lol = Lol.new
puts lol.winproc.call
puts binding.instance_exec &lol.winproc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment