Created
September 26, 2008 19:44
-
-
Save Mikoangelo/13186 to your computer and use it in GitHub Desktop.
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
>> class Foo | |
>> def initialize &block | |
>> instance_eval &block | |
>> end | |
>> def const_missing const | |
>> "foobar" | |
>> end | |
>> end | |
=> nil | |
>> Foo.new do RandomConstant end | |
NameError: uninitialized constant RandomConstant | |
from (irb):9 | |
from (irb):3:in `instance_eval' | |
from (irb):3:in `initialize' | |
from (irb):9:in `new' | |
from (irb):9 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment