Forum: Ruby require behavior in presence of two files of the same name

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2008-12-04 20:16
If I do

  require 'x'

and there are two x.rb files somewhere on the load path, which one will
be require'd?

Thanks,
Wes
Rob B. (Guest)
on 2008-12-04 21:23
(Received via mailing list)
On Dec 4, 2008, at 1:10 PM, Wes G. wrote:
> If I do
>
>  require 'x'
>
> and there are two x.rb files somewhere on the load path, which one
> will
> be require'd?
>
> Thanks,
> Wes


the first on that it finds while looking through the list in the load
path

-Rob

Rob B.    http://agileconsultingllc.com
removed_email_address@domain.invalid
This topic is locked and can not be replied to.