On Sun, Mar 2, 2014 at 10:20 PM, Henrik Nyh <[email protected]> wrote: > On Sun, Mar 2, 2014 at 8:11 PM, Xavier Noria <[email protected]> wrote: > >> I believe the culprit here is Delegator. >> Delegator owns const_missing, it is all or nothing (reproduced from >> memory): >> but it should not in my view: after trying its heuristic it should >> delegate to super if defined in case there are more heuristics above. >> Something like this (off the top of my head): >> > This small experiment illustrates that your solution does the trick: https://gist.github.com/henrik/9314943
If FakeDelegator's const_missing only does "::Object.const_get(name)", the last line of output will be "[ModuleConstMissing] Object missing NoSuch" instead of "[ModuleConstMissing] MyObject2 missing NoSuch". -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/groups/opt_out.
