Created
March 16, 2011 12:40
-
-
Save takaokouji/872416 to your computer and use it in GitHub Desktop.
Could not find the constant in class_eval.
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
module A | |
B = 10 | |
def f | |
class_eval { B } | |
end | |
end | |
class K | |
extend A | |
f | |
end | |
__END__ | |
$ macruby test_include.rb | |
test_include.rb:4:in `f': uninitialized constant K::B (NameError) | |
from test_include.rb:10:in `block' | |
from test_include.rb:8:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment