Created
April 24, 2012 21:53
-
-
Save zuchmanski/2484153 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
# Is a constant defined in a module that is then included in a class, available to instance methods from the module that ended up in that class? | |
module A | |
B = "b" | |
end | |
class D | |
include A | |
def e | |
B | |
end | |
end | |
d = D.new | |
p d.e # => "b" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment