summaryrefslogtreecommitdiff
path: root/spec/ruby/core/module
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2021-07-27 13:55:21 -0700
committerNobuyoshi Nakada <nobu@ruby-lang.org>2021-07-28 12:29:45 +0900
commit345db8f2aa373a31c619c8f85bd372f0a20829c1 (patch)
tree84d18ab963611db80bf578053f699e07341abf0b /spec/ruby/core/module
parent30d0e5d1ae4ee4a3c145ca4bdacaad5b09c49bb7 (diff)
Avoid pointless attempts to open .so file if already required
When attempting to require a file without an extension that has already been required or provided with an .so extension, only look for files with an .rb extension. There is no point in trying to find files with an .so extension, since we already know one has been loaded. Previously, attempting to require such a file scanned the load path twice, once for .rb and once for .so. Now it only scans once for .rb. The scan once for .rb cannot be avoided, since the .rb file would take precedence and should be loaded if it exists. Fixes [Bug #10902]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4687
Diffstat (limited to 'spec/ruby/core/module')
0 files changed, 0 insertions, 0 deletions