Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created September 8, 2015 12: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 anonymous/4a72f6d6ce92c08ca80f to your computer and use it in GitHub Desktop.
Save anonymous/4a72f6d6ce92c08ca80f to your computer and use it in GitHub Desktop.
class Object
def self.foo(bar)
self.class_eval do
self::BAR = bar
end
end
end
/tmp/test.rb:4: dynamic constant assignment
self::BAR = bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment