bc5cb60
From 301e30bf97dd603ca81d52b90186908575c4ddf8 Mon Sep 17 00:00:00 2001
bc5cb60
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@riseup.net>
bc5cb60
Date: Tue, 25 Feb 2020 15:01:44 +0100
bc5cb60
Subject: [PATCH] Revert "Exclude empty suffix from `-I` require loop"
bc5cb60
bc5cb60
This reverts commit 4fc0ab21c0f7713829abb522ce3b6d8e24c126b3.
bc5cb60
bc5cb60
Technically, extensionless ruby files are valid ruby files that can be
bc5cb60
required. For example, `bin/bundle` is sometimes required from other
bc5cb60
binstubs even if it's also runnable directly.
bc5cb60
bc5cb60
So, we should technically consider this kind of files too.
bc5cb60
---
bc5cb60
 lib/rubygems/core_ext/kernel_require.rb | 2 +-
bc5cb60
 1 file changed, 1 insertion(+), 1 deletion(-)
bc5cb60
bc5cb60
diff --git a/lib/rubygems/core_ext/kernel_require.rb b/lib/rubygems/core_ext/kernel_require.rb
bc5cb60
index 9712fb6ac0..a8d170f13a 100644
bc5cb60
--- a/lib/rubygems/core_ext/kernel_require.rb
bc5cb60
+++ b/lib/rubygems/core_ext/kernel_require.rb
bc5cb60
@@ -43,7 +43,7 @@ def require(path)
bc5cb60
     # https://github.com/rubygems/rubygems/pull/1868
bc5cb60
     resolved_path = begin
bc5cb60
       rp = nil
bc5cb60
-      Gem.suffixes[1..-1].each do |s|
bc5cb60
+      Gem.suffixes.each do |s|
bc5cb60
         load_path_insert_index = Gem.load_path_insert_index
bc5cb60
         break unless load_path_insert_index
bc5cb60