Skip to content

Instantly share code, notes, and snippets.

@ryanlecompte
Created January 19, 2012 05:24
Show Gist options
  • Save ryanlecompte/1638152 to your computer and use it in GitHub Desktop.
Save ryanlecompte/1638152 to your computer and use it in GitHub Desktop.
class M
def self.foo
puts Z
end
class Z
end
end
M.foo
code = <<-RUBY
def self.foo
p [Z, 200]
end
RUBY
M.class_eval(code)
M.foo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment