Last active
January 17, 2017 20:47
-
-
Save pdg137/c3817327ba744e2fc337cda37809d16a 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
module M | |
A = 1 | |
end | |
module M::N | |
B = 2 | |
end | |
class M::N::C | |
prepend M::N | |
prepend M | |
def self.hello | |
puts "A = #{A}" | |
puts "B = #{B}" | |
end | |
class D | |
def self.hello | |
# FAILS | |
puts "A = #{A}" | |
puts "B = #{B}" | |
end | |
end | |
end | |
M::N::C.hello | |
M::N::C::D.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment