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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 126c9b985692a11e6e94e0ba2674cb4e1f988902c811031195b4eaeeb5235c72
4
- data.tar.gz: 2054c8d7ac0e5daa6b15dd4f925f8f9290b0375662f70aa4006907ae2dc272f8
3
+ metadata.gz: 737408d65cfb578650938ddb99b0055cdfc46a34941c20f6f5252ada91811316
4
+ data.tar.gz: 2bada3234fc5cc47719e8dfdd1efbc86fd7b33c52ccbfcbf04f1f8f02f698d99
5
5
  SHA512:
6
- metadata.gz: cbd442d4b727460d145a9ab982464861b8d3f55884ca72d4078b8868315e3dfa14e776bdc70b51b9d995b8e9bd5195a2e4ffafe5f2d03f3106b7c67818f6a0a6
7
- data.tar.gz: fa39acdf60872ed793abee418bb2494a60daae5d5eac9daa901d958af268ecdce3de903600cbc4beb9ba101fea4d298c6240da1aa2604122f03d3c4a0d7a0233
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.0...main
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 = "bin"
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 ? yield(result) : result
58
+ failed ? block.call(result) : result
59
59
  else
60
- yield
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
- coerced = fn.(input) { |output = input| return yield(output) }
74
- type.call_safe(coerced) { |output = coerced| yield(output) }
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]
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Dry
4
4
  module Types
5
- VERSION = "1.9.0"
5
+ VERSION = "1.9.1"
6
6
  end
7
7
  end
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.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hanakai team
8
- bindir: bin
8
+ bindir: exe
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: