ruby - How does load/require/require_relative handle a file with no file extension? -


i have been using tutorial uses require file not have file extension.

i.e.:

onefile.rb:     require "secondfile"   secondfile.rb:      xxx 

in mind, i'm thinking there potential conflict (having 2 files same name, different extensions). naturally wondering how ruby handle determining file extension use load/require/require_relative when file has no file extension?

from documentation:

ruby tries adding “.rb”, “.so”, , on name until found.

http://apidock.com/ruby/kernel/require


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -