Created
August 21, 2011 17:15
-
-
Save luke-gru/1160867 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 | |
module Mod | |
def self.who | |
"mod" | |
end | |
end | |
class Test | |
include Mod | |
def self.who | |
ret = super | |
[ret, "test"] | |
end | |
end | |
p Test.ancestors # includes Mod | |
p Test.superclass # is Object!! | |
# Test.who DOESN'T WORK | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment