summaryrefslogtreecommitdiff
path: root/spec/ruby/shared/kernel
diff options
context:
space:
mode:
authorNAKAMURA Usaku <usa@ruby-lang.org>2021-11-24 19:27:06 +0900
committerNAKAMURA Usaku <usa@ruby-lang.org>2021-11-24 19:27:06 +0900
commitf236548038048118e766232034511e4877a59b49 (patch)
treef2d607adcf3b6319b75109800c897d77d089effd /spec/ruby/shared/kernel
parent7d4d38f8838579592e70fb04a6a2f0162fe989c2 (diff)
merge revision(s) 345db8f2aa373a31c619c8f85bd372f0a20829c1: [Backport #10902]
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] --- load.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
Diffstat (limited to 'spec/ruby/shared/kernel')
0 files changed, 0 insertions, 0 deletions