dry-types 1.9.0 → 1.9.1
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 +4 -4
- data/CHANGELOG.md +9 -1
- data/dry-types.gemspec +2 -2
- data/lib/dry/types/array/member.rb +3 -3
- data/lib/dry/types/constructor.rb +7 -3
- data/lib/dry/types/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 737408d65cfb578650938ddb99b0055cdfc46a34941c20f6f5252ada91811316
|
|
4
|
+
data.tar.gz: 2bada3234fc5cc47719e8dfdd1efbc86fd7b33c52ccbfcbf04f1f8f02f698d99
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d17fea6caf102e1fcbd97e088bccb3870fd2b1adc9917044be84321f43d8172955b3f78353977f70363cfbf3b69fbb95e10cefade93a5f36a8b16be87647398d
|
|
7
|
+
data.tar.gz: 0a607e37b3c6c9065796dd2f08c432feb7ffc6d3d70b44e28bcf3d8754290fea243c5f70d05b00546f911205abf7fee04ac34d670cc5f1982602783e9f867055
|
data/CHANGELOG.md
CHANGED
|
@@ -19,7 +19,15 @@ and this project adheres to [Break Versioning](https://www.taoensso.com/break-ve
|
|
|
19
19
|
|
|
20
20
|
### Security
|
|
21
21
|
|
|
22
|
-
[Unreleased]: https://github.com/dry-rb/dry-types/compare/v1.9.
|
|
22
|
+
[Unreleased]: https://github.com/dry-rb/dry-types/compare/v1.9.1...main
|
|
23
|
+
|
|
24
|
+
## [1.9.1] - 2026-02-06
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Add workaround for a [JRuby bug](https://github.com/jruby/jruby/issues/9208). (@katafrakt in #493)
|
|
29
|
+
|
|
30
|
+
[1.9.1]: https://github.com/dry-rb/dry-types/compare/v1.9.0...v1.9.1
|
|
23
31
|
|
|
24
32
|
## [1.9.0] - 2026-01-09
|
|
25
33
|
|
data/dry-types.gemspec
CHANGED
|
@@ -17,8 +17,8 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
spec.description = spec.summary
|
|
18
18
|
spec.homepage = "https://dry-rb.org/gems/dry-types"
|
|
19
19
|
spec.files = Dir["CHANGELOG.md", "LICENSE", "README.md", "dry-types.gemspec", "lib/**/*"]
|
|
20
|
-
spec.bindir = "
|
|
21
|
-
spec.executables = []
|
|
20
|
+
spec.bindir = "exe"
|
|
21
|
+
spec.executables = Dir["exe/*"].map { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ["lib"]
|
|
23
23
|
|
|
24
24
|
spec.extra_rdoc_files = ["README.md", "CHANGELOG.md", "LICENSE"]
|
|
@@ -42,7 +42,7 @@ module Dry
|
|
|
42
42
|
# @return [Array]
|
|
43
43
|
#
|
|
44
44
|
# @api private
|
|
45
|
-
def call_safe(input)
|
|
45
|
+
def call_safe(input, &block)
|
|
46
46
|
if primitive?(input)
|
|
47
47
|
failed = false
|
|
48
48
|
|
|
@@ -55,9 +55,9 @@ module Dry
|
|
|
55
55
|
output << coerced unless Undefined.equal?(coerced)
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
failed ?
|
|
58
|
+
failed ? block.call(result) : result
|
|
59
59
|
else
|
|
60
|
-
|
|
60
|
+
block.call
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
@@ -69,9 +69,13 @@ module Dry
|
|
|
69
69
|
# @return [Object]
|
|
70
70
|
#
|
|
71
71
|
# @api private
|
|
72
|
-
def call_safe(input)
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
def call_safe(input, &block)
|
|
73
|
+
# block.call is slower in JRuby than yield, but in JRuby 10.0.2.0 there is a bug
|
|
74
|
+
# with default block arguments, so block.call is chosen for correctness.
|
|
75
|
+
# This was introduced in PR https://github.com/dry-rb/dry-types/pull/493, might be reverted
|
|
76
|
+
# in the bug is fixed in JRuby.
|
|
77
|
+
coerced = fn.(input) { |output = input| return block.call(output) }
|
|
78
|
+
type.call_safe(coerced) { |output = coerced| block.call(output) }
|
|
75
79
|
end
|
|
76
80
|
|
|
77
81
|
# @return [Object]
|
data/lib/dry/types/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dry-types
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.9.
|
|
4
|
+
version: 1.9.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hanakai team
|
|
8
|
-
bindir:
|
|
8
|
+
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|