bootsnap 1.1.3-java → 1.1.4-java

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
  SHA1:
3
- metadata.gz: 1e5ced86d8f4b8e5cd77fd68bc776e0023d9486d
4
- data.tar.gz: 8e75434679474db2f1c3883495679ba11ad87a1f
3
+ metadata.gz: 11e26b3ba0d58a77f3c0cdef644a1cb909fcee2c
4
+ data.tar.gz: 72aece9a04a051b94c72fe259bd28e7b1b5890f8
5
5
  SHA512:
6
- metadata.gz: edc9608549f1e313b4c3bdc6fc788eb055918628116caa1ec3c397de5a3a7ed0cc97aa59b83a493553acce302dae5c44b23582138ec369584ad04288b60c332a
7
- data.tar.gz: b4b93d00b10ef0471fe056b068e97c8bb4295b0ce6c8091a5a8cf5d25c988cd2e23f9bc900fbcb12a4d639c8cd48cb34c3ea5c1e7284862dd5c7eec547bab811
6
+ metadata.gz: 70ab2d95fdf8783cee2923bdebc1c1ad50bcced6c7dee3d407c7b8fe7599783abcfc635f1ea3a51b889829c885a70ca7eab0007c2f148d083f03bcb44b1879fd
7
+ data.tar.gz: b3db3cfefb5de516143892bf2293c0d27ff9f7815fe559b88860eb8c12ce5c784684c8f15dcdbb0fdb70beb0352353aa96c68a7a8317e0e12c34a1ab2ebfb8ee
@@ -1,3 +1,7 @@
1
+ # 1.1.4
2
+
3
+ * Avoid loading a constant twice by checking if it is already defined
4
+
1
5
  # 1.1.3
2
6
 
3
7
  * Properly resolve symlinked path entries
@@ -2,15 +2,6 @@ module Bootsnap
2
2
  module LoadPathCache
3
3
  module CoreExt
4
4
  module ActiveSupport
5
- def self.with_bootsnap_fallback(error)
6
- yield
7
- rescue error => e
8
- # NoMethodError is a NameError, but we only want to handle actual
9
- # NameError instances.
10
- raise unless e.class == error
11
- without_bootsnap_cache { yield }
12
- end
13
-
14
5
  def self.without_bootsnap_cache
15
6
  prev = Thread.current[:without_bootsnap_cache] || false
16
7
  Thread.current[:without_bootsnap_cache] = true
@@ -50,13 +41,21 @@ module Bootsnap
50
41
  # behaviour. The gymnastics here are a bit awkward, but it prevents
51
42
  # 200+ lines of monkeypatches.
52
43
  def load_missing_constant(from_mod, const_name)
53
- CoreExt::ActiveSupport.with_bootsnap_fallback(NameError) { super }
44
+ super
45
+ rescue NameError => e
46
+ # NoMethodError is a NameError, but we only want to handle actual
47
+ # NameError instances.
48
+ raise unless e.class == NameError
49
+ raise if from_mod.const_defined?(const_name)
50
+ without_bootsnap_cache { super }
54
51
  end
55
52
 
56
53
  # Signature has changed a few times over the years; easiest to not
57
54
  # reiterate it with version polymorphism here...
58
55
  def depend_on(*)
59
- CoreExt::ActiveSupport.with_bootsnap_fallback(LoadError) { super }
56
+ super
57
+ rescue LoadError
58
+ without_bootsnap_cache { super }
60
59
  end
61
60
  end
62
61
  end
@@ -1,3 +1,3 @@
1
1
  module Bootsnap
2
- VERSION = "1.1.3"
2
+ VERSION = "1.1.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootsnap
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: java
6
6
  authors:
7
7
  - Burke Libbey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-06 00:00:00.000000000 Z
11
+ date: 2017-10-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement