Skip to content

Instantly share code, notes, and snippets.

@timfel
Created August 27, 2011 08:12
Show Gist options
  • Save timfel/1175130 to your computer and use it in GitHub Desktop.
Save timfel/1175130 to your computer and use it in GitHub Desktop.
Thread.start do
x = 1
eval("self.class.class_eval { define_method(:action) { x } }")
end.join
action # => 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment