Project

General

Profile

Actions

Feature #4523

closed

Kernel#require to return the path of the loaded file

Added by regularfry (Alex Young) over 13 years ago. Updated over 12 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:35552]

Description

=begin
It's very useful to be able to tell which actual file on disc was loaded following a call to require, without having to manually traverse $LOAD_PATH. This information is also not guaranteed to be in $LOADED_FEATURES.

The attached patch alters rb_require_safe's return value to indicate the loaded file iff a file is actually loaded.
=end


Files

require-path.patch (260 Bytes) require-path.patch regularfry (Alex Young), 03/25/2011 07:18 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0