Skip to content

Instantly share code, notes, and snippets.

@waynerobinson
Created October 30, 2012 02:36
Show Gist options
  • Save waynerobinson/3977981 to your computer and use it in GitHub Desktop.
Save waynerobinson/3977981 to your computer and use it in GitHub Desktop.
module MyMixin
def test_constant
puts MY_CONSTANT
end
end
class Foo
MY_CONSTANT = "BLAH"
include MyMixin
end
foo = Foo.new
# Will raise "uninitialized constant MyMixin::MY_CONSTANT (NameError)"
foo.test_constant
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment