ruby-1.9.2-head > "".method(:pluralize).source_location => ["/mnt/hgfs/ubuntu_shared/edge/vendor/rails/activesupport/lib/ active_support/core_ext/string/inflections.rb", 15]
But overall to me this decision certainly makes sense since the modules which were created to store core extensions were kind of useless and created deep nesting like ActiveSupport::CoreExtensions::String obscuring the final purpose of exactly extending just String. So IMO that's a scannability win. On Apr 8, 4:21 am, Ryan Bigg <[email protected]> wrote: > Greetings, > > I've seen a couple of people ask about why core extensions in Rails 3 are > now extensions to the class. I haven't had or heard of a clear enough answer > so I tend to steer away. Until today. > > Toby Tripp tweeted the > following:http://twitter.com/tobytripp/status/11793190224. > > I think this is a fantastic point. How else am I able to determine if a > method is Ruby core or Rails core extension easily otherwise, without > referencing the documentation? I can imagine that the core extensions were > done this way to add to the speed of loading them, but again, I do not know > the clear reason. > > Could someone clarify as to why it was done this way rather than extending > the classes with modules that are included? Thank you! > > -- > Ryan Bigg / Radar -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
