bootsnap 1.11.0 → 1.11.1

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
  SHA256:
3
- metadata.gz: af127c58fb31e53309de406862116407d9f57d43514937d400a0f87c13080447
4
- data.tar.gz: 497f3a471eed46b68e624f8cda87bc6d5e97d5a17bdf4cbeb2221019fb21d531
3
+ metadata.gz: 1cc142349008790c310bcbc875a437996403242e579f85fb48f46eceecb383ad
4
+ data.tar.gz: fa1d21fafa8a4fa4d44ced76d597b773d3321e077dc815ccbcae3fe9dc4e661a
5
5
  SHA512:
6
- metadata.gz: 32c3bba78bf66bb71b47d78e06592e4a670735d581c84043b4c125704fb91d4cff900da0e2884c910f3c66ddf9e31f4860a33718da978cc9f2719e32a9f1f617
7
- data.tar.gz: 11a5bdee97b35fc99d346ae2cd44e95e8fc3cfd949bddc06a7561b7329fd42a0e63ef5e747a90fa599125100cc368d9ef6c9ad207a1a69fe51f6c32e71992611
6
+ metadata.gz: 81445538692ae0dc34b7309c44195fce5c864e508afe6eed4124d3d87bc1bfa07fd2ddb2c602faa2409f1537f8da63b885fd692bdc74e961febdd2a39e6e1919
7
+ data.tar.gz: 6389ce3a667c528660976665ce8184fb61d638da6cd4040e7b2d55441679574bdf691e4991294396c19a6e79bbf185ba1cdca848d5ea499a5b8e197dca143a5f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Unreleased
2
2
 
3
+ # 1.11.1
4
+
5
+ * Fix the `can't modify frozen Hash` error on load path cache mutation. See #411.
6
+
3
7
  # 1.11.0
4
8
 
5
9
  * Drop dependency on `fileutils`.
@@ -29,8 +29,8 @@ module Bootsnap
29
29
 
30
30
  v = get(key)
31
31
  unless v
32
- @dirty = true
33
32
  v = yield
33
+ mark_for_mutation!
34
34
  @data[key] = v
35
35
  end
36
36
  v
@@ -40,7 +40,7 @@ module Bootsnap
40
40
  raise(SetOutsideTransactionNotAllowed) unless @txn_mutex.owned?
41
41
 
42
42
  if value != @data[key]
43
- @dirty = true
43
+ mark_for_mutation!
44
44
  @data[key] = value
45
45
  end
46
46
  end
@@ -59,6 +59,11 @@ module Bootsnap
59
59
 
60
60
  private
61
61
 
62
+ def mark_for_mutation!
63
+ @dirty = true
64
+ @data = @data.dup if @data.frozen?
65
+ end
66
+
62
67
  def commit_transaction
63
68
  if @dirty
64
69
  dump_data
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bootsnap
4
- VERSION = "1.11.0"
4
+ VERSION = "1.11.1"
5
5
  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.11.0
4
+ version: 1.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Burke Libbey