diff options
-rw-r--r-- | lib/bundled_gems.rb | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -143,18 +143,8 @@ module Gem::BUNDLED_GEMS # Additionally, we need to skip Bootsnap and Zeitwerk if present, these # gems decorate Kernel#require, so they are not really the ones issuing # the require call users should be warned about. Those are upwards. - frames_to_skip = 2 - location = nil - Thread.each_caller_location do |cl| - if frames_to_skip >= 1 - frames_to_skip -= 1 - next - end - - if cl.base_label != "require" - location = cl.path - break - end end if location && File.file?(location) && !location.start_with?(Gem::BUNDLED_GEMS::LIBDIR) |