Changing Rails.root to a Pathname was great and all (I'm a strong believer
that us Rubyists shouldn't handle paths or URLs as String objects), but
there's one thing I've discovered just now that kinda ruins the joy.
With string paths, these two lines are equivalent:
"#{Rails.root}/tmp/foo"
Rails.root + "/tmp/foo"
Now that Rails.root is a Pathname, they do totally different things. While
the first one becomes "/path/to/app/tmp/foo", the second becomes just
"/tmp/foo" because Pathname overloads the "+" operator in a similar way that
URI does it.
Thoughts? Think this may break apps? It broke mine, but I'm not complaining
-- being subscribed to edge commits helps me resolve these kinds of issues
in a matter of seconds. To other folks upgrading to 2.3, this may take much
longer to track down.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---