Project

General

Profile

Bug #5091

Can't require './.testrb'

Added by trans (Thomas Sawyer) over 8 years ago. Updated over 8 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux]
Backport:
[ruby-core:38464]

Description

Just ran across this oddity. I made a local configuration file called .testrb, but I can't require it.

require './.testrb'
LoadError: no such file to load -- ./.testrb

Just to make sure I did not mess up somehow, I renamed it to .rbtest and it worked fine. I change it back and still no go.

I tried it under 1.9.2 and 1.8.7, both failed to require the file.

History

Updated by drbrain (Eric Hodel) over 8 years ago

For require the filename must end in .rb, .so, .dll, .dylib, etc.

load will work with any file extension.

Updated by trans (Thomas Sawyer) over 8 years ago

My bad. Apparently I was in a variant quantum universe earlier today.

Updated by nobu (Nobuyoshi Nakada) over 8 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF