Skip to content

Instantly share code, notes, and snippets.

@zuchmanski
Created April 24, 2012 21:53
Show Gist options
  • Save zuchmanski/2484153 to your computer and use it in GitHub Desktop.
Save zuchmanski/2484153 to your computer and use it in GitHub Desktop.
# 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