Skip to content

Commit 7e0910a

Browse files
committed
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>'" ---
1 parent 7594a29 commit 7e0910a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/bundled_gems.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def self.uplevel
9898
end
9999
end
100100
end
101-
1
101+
require_found ? 1 : 2
102102
end
103103

104104
def self.find_gem(path)

0 commit comments

Comments
 (0)