diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-12-13 16:38:15 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2023-12-14 07:48:08 +0900 |
commit | 5a0cbc934428b3babdce6f5d014c30afcb84e567 (patch) | |
tree | 106f6f5125f17bf81848b0d12a1de4a2facc6365 /lib | |
parent | 8b0c62696203daba815fa4e6d1c08dc143b3cc04 (diff) |
Detect bootsnap from all frames
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundled_gems.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/bundled_gems.rb b/lib/bundled_gems.rb index 0cd3805bd9..3d7243e7a3 100644 --- a/lib/bundled_gems.rb +++ b/lib/bundled_gems.rb @@ -102,8 +102,12 @@ module Gem::BUNDLED_GEMS else return end - # Warning feature is not working correctly with Bootsnap - return if caller_locations(2,1)[0]&.path.match?(/bootsnap/) + # Warning feature is not working correctly with Bootsnap. + # caller_locations returns: + # lib/ruby/3.3.0+0/bundled_gems.rb:65:in `block (2 levels) in replace_require' + # $GEM_HOME/gems/bootsnap-1.17.0/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:32:in `require'" + # ... + return if caller_locations(2).find {|c| c&.path.match?(/bootsnap/) } return if WARNED[name] WARNED[name] = true if gem == true |