> Pathname #+ just coerces the argument to a pathname before
> concatenating, so that it can return another pathname instance. The
> problem with Mislav's example is the preceding "/" on "/tmp/foo":
>
>>> (Rails.root + "/tmp/foo").to_s
> => "/tmp/foo"
>>> (Rails.root + "tmp/foo").to_s
> => "/Users/geoff/Sites/edgerails/tmp/foo"
Man that's weird!
> Not intuitive, I agree. String interpolation, however, works as
> expected:
>
>>> "#{Rails.root}/tmp/foo"
> => "/Users/geoff/Sites/edgerails/tmp/foo"
This is a little iffy, but I'd like to let this sit in edge for a
while and we'll see what other surprises are lurking in there.
We'll probably need to make sure this is well documented in the
eventual 2.3 release notes, or rolled back if it's too painful to make
a smooth migration path for users.
--
Cheers
Koz
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---