Created
May 13, 2016 12:15
-
-
Save anonymous/56cc6181bb8d45b238eefa0d154bfc0f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
klass = Class.new do | |
def hello | |
puts MY_CONST | |
end | |
end | |
klass.new.class.const_set 'MY_CONST', Time.now | |
Object.const_set 'HelloClass', klass | |
HelloClass.new.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment