Project

General

Profile

Bug #15206

require_relative in std_lib

Added by marcandre (Marc-Andre Lafortune) 11 days ago. Updated 10 days ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-core:89291]

Description

I noticed that there are some require for internal files in lib/. Ideally, they would be using require_relative instead. This is faster and more explicit.

Note: require_relative had a potential issue with symlinks that was fixed in 2.5, so libraries that might be loaded from earlier Ruby, like rubygems, can not yet be updated.

I've created a PR and would like to know if there are comments / objections / things I'm missing.


Related issues

Is duplicate of Ruby trunk - Feature #8781: Use require_relative() instead of require() if possibleOpen

History

#1 [ruby-core:89296] Updated by MSP-Greg (Greg L) 10 days ago

The Appveyor run on the PR passed.

Appveyor testing has been intermittently failing. With parallel/multi testing (test-all and/or test-spec), there can be a lot more files being checked and possibly loaded. Considering more than one CI VM may be exist on a system, and they may share drives, anything that lowers disk I/O is good.

#2 Updated by shyouhei (Shyouhei Urabe) 8 days ago

  • Is duplicate of Feature #8781: Use require_relative() instead of require() if possible added

Also available in: Atom PDF