On Mon, Sep 30, 2013 at 9:09 PM, Aaron Patterson
<[email protected]>wrote:

On Mon, Sep 30, 2013 at 08:16:27PM +0200, Xavier Noria wrote:
> > Agreed. I believe that if the argument is not a string we should check if
> > it responds to #to_path.
>
> Do we even need to check?  Won't it eventually get required, and Ruby
> will blow up?


Delegation would be more clean, but there's quite a bit of code between the
invocation and the actual Kernel#load or require call, and strings are
assumed along the way (#sub, =~, etc.). It will be easier to follow the
#to_path contract I believe.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to