mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
11e05defec
In the following situation: ```ruby class Bar end module Baz end class Foo prepend Baz end class Foo::Bar end ``` Running `Inflector.constantize('Foo::Bar')` would blow up with a NameError. What is happening is that `constatize` was written before the introduction of prepend, and wrongly assume that `klass.ancestors.first == klass`. So it uses `klass.ancestors.inject` without arguments, as a result a prepended module is used in place of the actual class. |
||
---|---|---|
.. | ||
sub_class_conflict.rb |