Created
April 24, 2009 17:39
-
-
Save ender672/101233 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
========== test.rb ========== | |
module MixinModule | |
def say_hello | |
puts "Hello #{CLASS_CONSTANT}" | |
end | |
end | |
class SomeClass | |
CLASS_CONSTANT = 'FOO!' | |
include MixinModule | |
end | |
SomeClass.new.say_hello | |
============================= | |
$ ruby test.rb | |
test.rb:3:in `say_hello': uninitialized constant MixinModule::CLASS_CONSTANT (NameError) | |
from test.rb:12 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment