Skip to content

Instantly share code, notes, and snippets.

@ohammersmith
Created February 13, 2009 00:40
Show Gist options
  • Select an option

  • Save ohammersmith/62970 to your computer and use it in GitHub Desktop.

Select an option

Save ohammersmith/62970 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
class Demo
def initialize(n)
@secret = n
end
def getBinding
return binding()
end
end
k1 = Demo.new(99)
b1 = k1.getBinding
k2 = Demo.new(-3)
b2 = k2.getBinding
puts eval("@secret", b1)
puts eval("@secret", b2)
puts eval("@secret")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment