diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-08-08 16:18:06 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-08-08 16:20:22 +0900 |
commit | 7e0910a82c81137731b5fd553bc312177d69d6a4 (patch) | |
tree | 493005f12acf56f8fc0e2ace16232924983d41bd | |
parent | 7594a292b19cb3bde971da294930f6bb2b4e4bc1 (diff) |
We should use uplevel:2 in another case.
Like the following scenario with bootsnap, that frames are same or smaller than frame_to_skip(=3).
---
"/Users/hsbt/.local/share/rbenv/versions/3.3-dev/lib/ruby/3.3.0/bundled_gems.rb:69:in `block (2 levels) in replace_require'"
"/Users/hsbt/.local/share/gem/gems/bootsnap-1.18.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'"
"test_warn_bootsnap.rb:11:in `<main>'"
---
-rw-r--r-- | lib/bundled_gems.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index bb5e296e57..25c38b0e82 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -98,7 +98,7 @@ module Gem::BUNDLED_GEMS end end end - 1 + require_found ? 1 : 2 end def self.find_gem(path) |