On Monday, December 8, 2014 2:35:12 PM UTC-5, Xavier Noria wrote: > > There's no solution, in general you cannot design AS::Dependencies with > emulation in mind. It does not even lookup in "ancestor" paths! > > It doesn't emulate, it cannot emulate, it has its own rules. >
I'm convinced that emulation of the ruby behaviour is not possible. However, I'm still not fully understanding this. My example is really about how the behaviour differs based on whether or not certain constants are already loaded -- all I want to do is handle the "constant already loaded" case in the same way as the "constant not yet loaded" case. As far as I can tell, I'm not really proposing a new behaviour, because it is already the behaviour one gets if the constant has not yet been loaded. I'm still trying to understand if there's a reason why it cannot work like this, or if it is just for backwards compatibility. Your original reply somewhat addressed this: As your example shows it yields unexpected behavior (if one expects Ruby > rules), and it depends on load order. If by luck that was already loaded, > we act some way, if not yet loaded, in a different way. That's not good IMO > and if it weren't for backwards compatibility I would be inclined to remove > it. > -- 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 rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at http://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.