Created
July 12, 2012 07:14
-
-
Save inre/3096413 to your computer and use it in GitHub Desktop.
Simple module stacking
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
#DIS IS SPARTA! | |
class Module | |
def method_missing(*args, &block) | |
const_get(*args) | |
rescue | |
super(*args, &block) | |
end | |
end |
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
module M | |
module A | |
end | |
end | |
p M.A |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment