Created
November 25, 2011 01:18
-
-
Save kuruma-gs/1392603 to your computer and use it in GitHub Desktop.
強度確認
This file contains hidden or 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
class A | |
def a | |
"super" | |
end | |
end | |
module B | |
def a | |
"module" | |
end | |
end | |
module B2 | |
def a | |
"module2" | |
end | |
end | |
class C < A | |
def a | |
"direct" | |
end | |
include B | |
end | |
C.new.a #=> "direct" | |
class D < A | |
include B | |
end | |
D.new.a #=> "module" | |
class E < A | |
include B | |
include B2 | |
end | |
E.new.a #=> "module2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment