bootsnap 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fe31f9a445fa33edd58c5f58e0f661c0e08d2004
4
- data.tar.gz: e01345ff505baf0ce9aa6a104325a93092d0ab53
3
+ metadata.gz: 9899f0b2bee1a4e655277b00c7e31aa9b9bb11de
4
+ data.tar.gz: 10d657b77486731b2dc6cb0c21b6b9cd59dcb021
5
5
  SHA512:
6
- metadata.gz: c319a87aa7d1db72c3535e0af539cd8629852238b4b88bcc1b4a7cf57ea978707aa82b879730815e293c5944b4c40d8b2531a8639780491853c58b66de01191e
7
- data.tar.gz: d2d6042b09014425a6d4feb3d1abe28c1a1eaeddd1c29fff8752ba907322349129d065c38109b6d460438b667a72b04626165a59cde12f7af509c9043ba254e5
6
+ metadata.gz: 345a4bf40d80ca9b04d03a8c5088758f59dddf6ff8272637bc6cd247f8047ee4dfbccf9ff2d6866d6220361c110d60d6ba08addb76a43e6d7fd36f04fb643c5a
7
+ data.tar.gz: 5ec8b6b63ef27265355d6ff879c710d3720a3fb7671e78e07326ddaeca7d77af800ddc86e13ddc4c1079449e9bbc79d7fedf1efe4a76c68dab6453f041d5fbac
@@ -54,22 +54,20 @@ module Bootsnap
54
54
  x = search_index(feature)
55
55
  return x if x
56
56
 
57
+ # Ruby has some built-in features that require lies about.
58
+ # For example, 'enumerator' is built in. If you require it, ruby
59
+ # returns false as if it were already loaded; however, there is no
60
+ # file to find on disk. We've pre-built a list of these, and we
61
+ # return false if any of them is loaded.
62
+ raise LoadPathCache::ReturnFalse if BUILTIN_FEATURES.key?(feature)
63
+
57
64
  # The feature wasn't found on our preliminary search through the index.
58
65
  # We resolve this differently depending on what the extension was.
59
66
  case File.extname(feature)
60
67
  # If the extension was one of the ones we explicitly cache (.rb and the
61
68
  # native dynamic extension, e.g. .bundle or .so), we know it was a
62
69
  # failure and there's nothing more we can do to find the file.
63
- when *CACHED_EXTENSIONS # .rb, .bundle or .so
64
- nil
65
- # If no extension was specified, it's the same situation, since we
66
- # try appending both cachable extensions in search_index. However,
67
- # there's a special-case for 'enumerator'. Before ruby 1.9, you had
68
- # to `require 'enumerator'` to use it. In 1.9+, it's pre-loaded, but
69
- # doesn't correspond to any entry on the filesystem. Ruby lies. So we
70
- # lie too, forcing our monkeypatch to return false like ruby would.
71
- when ""
72
- raise LoadPathCache::ReturnFalse if BUILTIN_FEATURES.key?(feature)
70
+ when '', *CACHED_EXTENSIONS # no extension, .rb, (.bundle or .so)
73
71
  nil
74
72
  # Ruby allows specifying native extensions as '.so' even when DLEXT
75
73
  # is '.bundle'. This is where we handle that case.
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "0.2.9"
2
+ VERSION = "0.2.10"
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: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey