dry-monads 1.7.0 → 1.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/lib/dry/monads/maybe.rb +1 -1
- data/lib/dry/monads/result.rb +2 -2
- data/lib/dry/monads/right_biased.rb +2 -2
- data/lib/dry/monads/try.rb +1 -1
- data/lib/dry/monads/validated.rb +3 -3
- data/lib/dry/monads/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: 71e72f068689b13c930f32796d5d235638fbc8f685b4274070b6e418d1bb1ec3
|
4
|
+
data.tar.gz: 81523f64fc36c7ddfe4f9b90490f7477ad94d43abb52d9b594b9b0bb8b1f4c1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9164e029f4482abaaa3bae2111607417ba3c3867ffc44f10a6626697ffa8793d291cc96518563d2eec8950f0594814167cf04f242f6354f581873256862b672
|
7
|
+
data.tar.gz: 8c915830df01f6461efe56db8c38ec248cb9778270a6b5f5f1b0c2464e0cb6794806d031a62c9e47ed770f0f964b38ba461599afa40d2ac2f35ecc71904961cd
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
<!--- DO NOT EDIT THIS FILE - IT'S AUTOMATICALLY GENERATED VIA DEVTOOLS --->
|
2
2
|
|
3
|
+
## 1.7.1 2025-01-21
|
4
|
+
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
|
8
|
+
- Fix warnings about unused block arguments (@flash-gordon)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v1.7.0...v1.7.1](https://github.com/dry-rb/dry-monads/compare/v1.7.0...v1.7.1)
|
12
|
+
|
3
13
|
## 1.7.0 2025-01-07
|
4
14
|
|
5
15
|
|
data/lib/dry/monads/maybe.rb
CHANGED
data/lib/dry/monads/result.rb
CHANGED
@@ -126,7 +126,7 @@ module Dry
|
|
126
126
|
# Ignores values and returns self, see {Failure#alt_map}
|
127
127
|
#
|
128
128
|
# @return [Result::Success]
|
129
|
-
def alt_map(_ = nil) = self
|
129
|
+
def alt_map(_ = nil, &) = self
|
130
130
|
end
|
131
131
|
|
132
132
|
# Represents a value of a failed operation.
|
@@ -371,7 +371,7 @@ module Dry
|
|
371
371
|
# @param fail [#call] Fallback value
|
372
372
|
# @param block [Proc] Fallback block
|
373
373
|
# @return [Success<Any>]
|
374
|
-
def to_result(_fail = Unit) = Result::Success.new(@value)
|
374
|
+
def to_result(_fail = Unit, &) = Result::Success.new(@value)
|
375
375
|
end
|
376
376
|
|
377
377
|
class None < Maybe
|
@@ -94,7 +94,7 @@ module Dry
|
|
94
94
|
# Returns value. It exists to keep the interface identical to that of RightBiased::Left
|
95
95
|
#
|
96
96
|
# @return [Object]
|
97
|
-
def value_or(_val = nil) = @value
|
97
|
+
def value_or(_val = nil, &) = @value
|
98
98
|
|
99
99
|
# Applies the stored value to the given argument if the argument has type of Right,
|
100
100
|
# otherwise returns the argument.
|
@@ -316,7 +316,7 @@ module Dry
|
|
316
316
|
# identical to that of {RightBiased::Right}.
|
317
317
|
#
|
318
318
|
# @return [RightBiased::Left]
|
319
|
-
def and(_) = self
|
319
|
+
def and(_, &) = self
|
320
320
|
|
321
321
|
# Pattern matching
|
322
322
|
#
|
data/lib/dry/monads/try.rb
CHANGED
data/lib/dry/monads/validated.rb
CHANGED
@@ -103,12 +103,12 @@ module Dry
|
|
103
103
|
# Ignores values and returns self, see {Invalid#alt_map}
|
104
104
|
#
|
105
105
|
# @return [Validated::Valid]
|
106
|
-
def alt_map(_ = nil) = self
|
106
|
+
def alt_map(_ = nil, &) = self
|
107
107
|
|
108
108
|
# Ignores arguments, returns self
|
109
109
|
#
|
110
110
|
# @return [Validated::Valid]
|
111
|
-
def or(_ = nil) = self
|
111
|
+
def or(_ = nil, &) = self
|
112
112
|
|
113
113
|
# @return [String]
|
114
114
|
def inspect
|
@@ -185,7 +185,7 @@ module Dry
|
|
185
185
|
# Ignores the passed argument and returns self
|
186
186
|
#
|
187
187
|
# @return [Validated::Invalid]
|
188
|
-
def fmap(_ = nil) = self
|
188
|
+
def fmap(_ = nil, &) = self
|
189
189
|
|
190
190
|
# Yields the given callable and returns the result
|
191
191
|
#
|
data/lib/dry/monads/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-monads
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Shilnikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-01-
|
11
|
+
date: 2025-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|