Consider:
Case A)
module A
module B
class C
M
end
end
end
Case B)
module A::B
class C
M
end
end
Case C)
class A::B::C
M
end
Case D)
class X::Y::Z
class A::B::C
M
end
end
Case E)
A::B::C::M
We have 5 examples. In every one of them Ruby resolves in a different way,
but AS::Dependencies cannot because in all of them it only knows that a
constant "M" was missing in a class whose name is "A::B::C", that's all.
In case D, for example, A::B::M should *not* be checked, but X::Y::Z::M
should be checked. The proposal fixes one case, but breaks some others
equally valid in addition to constant paths (whose detection is the
motivation for the special rule we both agree is a dubious idea).
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.
--
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/d/optout.