dry-types 1.8.2 → 1.8.3
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 +10 -0
- data/lib/dry/types/builder_methods.rb +8 -1
- 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: 2ac97b1fa05d97dc4e804baa514f3828d1c015c59ab46c744c25d0eb3ed3bbfb
|
4
|
+
data.tar.gz: ff74859d8d09bdb217cc7fe91679961b31dd9382f533d67dedc368d8660c7479
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c49e54d687551e1b14b1389d1e98d3b08d77c8e2e9ac0601a28a9d37dfdcefc4973c465ee3ce5e94a5e0c2b4d68fac0c62b8f9c9e5c462aeba3bbaa845bc64e6
|
7
|
+
data.tar.gz: e7a169e108bd6f434bbbc1010062b7c182748bd966b68ca3baee9ba7bfec7de3d74918471bf1f19fdd448d2e3fe1366f62fc59e232dd65914f7945c06d0dba57
|
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.8.3 2025-06-09
|
4
|
+
|
5
|
+
|
6
|
+
### Fixed
|
7
|
+
|
8
|
+
- Raise error on passing a non-module object to Instance (ref #480) (@flash-gordon)
|
9
|
+
|
10
|
+
|
11
|
+
[Compare v1.8.2...v1.8.3](https://github.com/dry-rb/dry-types/compare/v1.8.2...v1.8.3)
|
12
|
+
|
3
13
|
## 1.8.2 2025-01-31
|
4
14
|
|
5
15
|
|
@@ -43,7 +43,14 @@ module Dry
|
|
43
43
|
# @param [Class,Module] klass Class or module
|
44
44
|
#
|
45
45
|
# @return [Dry::Types::Type]
|
46
|
-
def Instance(klass)
|
46
|
+
def Instance(klass)
|
47
|
+
unless klass.is_a?(::Module)
|
48
|
+
raise ::ArgumentError, "Expected a class or module, got #{klass.inspect}"
|
49
|
+
end
|
50
|
+
|
51
|
+
Nominal(klass).constrained(type: klass)
|
52
|
+
end
|
53
|
+
|
47
54
|
alias_method :Strict, :Instance
|
48
55
|
|
49
56
|
# Build a type with a single value
|
data/lib/dry/types/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dry-types
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bigdecimal
|