bootsnap 1.4.0.pre2 → 1.4.0.pre3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 27963f8b281c516cef838264adcfb1b16e45b59d0c173f196642b5bc938c6de0
4
- data.tar.gz: b21f67ce3edab72f1e77b825d18893a13f940a0084b37bbeab9f41855edf7ce4
3
+ metadata.gz: 183730814ecdc4b8fe707083b1bdb0c2560cbf5a53efb150ccaa83c984570eff
4
+ data.tar.gz: c383caff1fa9c151fdb9e32a34dfd05a9092df90ea520152e40b178b5230edac
5
5
  SHA512:
6
- metadata.gz: 96eeff9ea1052acb331c2328b5179b6c51598eaaf91ea2a1807e6af1ccc5d8086a1b9250bc1d032a090048f1df3fae5464542773a6fbbf4bcdb1b0e78229edad
7
- data.tar.gz: 97371ef01bfbb3dbc9709856a8bb8831879b561787bf5b03ad6f8bf7e9e5ad159257278b857615a588715b3b8da76dcf65c74393c185f78ecdcab60d059ed8f0
6
+ metadata.gz: 82ddd2485682ac7dbb233850cee0491bacb489e4ddcf8b01debe53e3b600de35a466b968bf6c43d00247f15c79c7fa4566f1944d88cf9859f0c51ea48664f069
7
+ data.tar.gz: 5716447964e8109dab8537eb3415f50da5408003f8b16625d8a6ea8f585510d238c8973035b3cc03df4be7c31c949c2b74928a613d7b03f65cc07fc8580f3bb4
@@ -19,10 +19,6 @@ module Kernel
19
19
  def require_with_bootsnap_lfi(path, resolved = nil)
20
20
  Bootsnap::LoadPathCache.loaded_features_index.register(path, resolved) do
21
21
  require_without_bootsnap(resolved || path)
22
- # TODO(burke): if resolved was nil, the correct thing here is probably to
23
- # ingress the appended contents to $LOADED_FEATURES into the LFI, but
24
- # it's hard to imagine how to do this without creating a bunch of
25
- # redundant work, since require can call itself a bunch of times.
26
22
  end
27
23
  end
28
24
 
@@ -74,9 +74,16 @@ module Bootsnap
74
74
  # 2. Inspect $LOADED_FEATURES upon return from yield to find the matching
75
75
  # entry.
76
76
  def register(short, long = nil)
77
- ret = yield
77
+ if long.nil?
78
+ pat = %r{/#{Regexp.escape(short)}(\.[^/]+)?$}
79
+ len = $LOADED_FEATURES.size
80
+ ret = yield
81
+ long = $LOADED_FEATURES[len..-1].detect { |feat| feat =~ pat }
82
+ else
83
+ ret = yield
84
+ end
78
85
 
79
- hash = long.hash # N.B. this won't be "correct" when long is nil
86
+ hash = long.hash
80
87
 
81
88
  # do we have 'bundler' or 'bundler.rb'?
82
89
  altname = if File.extname(short) != ''
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.4.0.pre2"
2
+ VERSION = "1.4.0.pre3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0.pre2
4
+ version: 1.4.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey