Skip to content

Instantly share code, notes, and snippets.

@0x0dea

0x0dea/boc.rb Secret

Created September 7, 2015 22:17
Show Gist options
  • Save 0x0dea/24eb06e6b9b8cc8a9483 to your computer and use it in GitHub Desktop.
Save 0x0dea/24eb06e6b9b8cc8a9483 to your computer and use it in GitHub Desktop.
require 'binding_of_caller'
def foo
eval 'x = 2; y = 3', binding.of_caller(1)
end
x = 1
foo
x # => 2
y # => NameError
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment