Skip to content

Instantly share code, notes, and snippets.

@luke-gru
Created August 21, 2011 17:15
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 luke-gru/1160867 to your computer and use it in GitHub Desktop.
Save luke-gru/1160867 to your computer and use it in GitHub Desktop.
#!/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