3 ms·
>>Rails does overload Ruby's autoload (naturally - no core functionality can remain un-monkeypatched. ;-)) Are you sure about that? To me it seems that if you
by pothibo 13y ago
>>Rails does overload Ruby's autoload (naturally - no core functionality can remain un-monkeypatched. ;-))
Are you sure about that? To me it seems that if you pass a path to autoload, it does work like ruby STL
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/dependencies/autoload.rb#L35 https://github.com/rails/rails/blob/master/activesupport/lib...
- urbanautomaton 13y agoYep - if you pass a path the behaviour is as normal, but it's still overloaded to support the path inference behaviour. I guess it's not really monkeypatching though as `Module` itself is not modified, and you have to deliberately choose to use `ActiveSupport::Autoload`, so I reluctantly retract my parenthetical snark. :-)