Skip to content

Instantly share code, notes, and snippets.

@ender672 ender672/gist:101233
Created Apr 24, 2009

Embed
What would you like to do?
========== 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
You can’t perform that action at this time.