Project

General

Profile

Actions

Bug #5091

closed

Can't require './.testrb'

Added by trans (Thomas Sawyer) almost 13 years ago. Updated almost 13 years ago.

Status:
Rejected
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.

Updated by drbrain (Eric Hodel) almost 13 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) almost 13 years ago

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

Updated by nobu (Nobuyoshi Nakada) almost 13 years ago

  • Status changed from Open to Rejected
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0