concurrent-ruby 1.2.1 → 1.2.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1cad803df2c0fe187f3208dce2972feaa94daefcbd3749770abe3abfc0642fe9
|
4
|
+
data.tar.gz: 216b0196496fde70f53cc82b83cd593ec5267a53dcac9a312f254ae627f7761e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 605762fd9c26a5a783dcb834f9db5d818ba2b52431b382a7abd33aaddfcc0df8c5005abf0e1a7ebacf3aced9ebb61ee7080fd59050805422f4fc5593925ae935
|
7
|
+
data.tar.gz: ae916f03459f583497ab268aa82cc79d24dcddb2c51a86abf86313ad77faf975d10d22048ca03179c6583832fc0e25f3f3c1618de0668f9a2774486d7e15e41c
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
## Current
|
2
2
|
|
3
|
+
## Release v1.2.2 (24 Feb 2023)
|
4
|
+
|
5
|
+
* (#993) Fix arguments passed to `Concurrent::Map`'s `default_proc`.
|
6
|
+
|
7
|
+
## Release v1.2.1 (24 Feb 2023)
|
8
|
+
|
3
9
|
* (#990) Add missing `require 'fiber'` for `FiberLocalVar`.
|
4
10
|
* (#989) Optimize `Concurrent::Map#[]` on CRuby by letting the backing Hash handle the `default_proc`.
|
5
11
|
|
@@ -14,7 +14,7 @@ module Concurrent
|
|
14
14
|
# reasons.
|
15
15
|
def initialize(options = nil, &default_proc)
|
16
16
|
validate_options_hash!(options) if options.kind_of?(::Hash)
|
17
|
-
|
17
|
+
set_backend(default_proc)
|
18
18
|
@default_proc = default_proc
|
19
19
|
end
|
20
20
|
|
@@ -113,9 +113,17 @@ module Concurrent
|
|
113
113
|
|
114
114
|
private
|
115
115
|
|
116
|
+
def set_backend(default_proc)
|
117
|
+
if default_proc
|
118
|
+
@backend = ::Hash.new { |_h, key| default_proc.call(self, key) }
|
119
|
+
else
|
120
|
+
@backend = {}
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
116
124
|
def initialize_copy(other)
|
117
125
|
super
|
118
|
-
@
|
126
|
+
set_backend(@default_proc)
|
119
127
|
self
|
120
128
|
end
|
121
129
|
|
Binary file
|