backports 3.24.0 → 3.24.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/backports/3.2.0/data.rb +2 -7
- data/lib/backports/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: e2a822b77667d9e87ca05ecb722dc91204f4ef72e88575b534d969bd0c2784f1
|
4
|
+
data.tar.gz: 47bb61fa96fde1da093d230fd7fab4f45dfbe58bf89ac1db56dceb9d0525a7e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45939ddca1b04d95d536e652780205d8e53fd154705ce0d28fa79abcaedd628375e81abe5972638edf3d57cdf874426c8b8756156a4f6691c1682843dbdf0ad1
|
7
|
+
data.tar.gz: 9e0f10a128b5871c015beb2c77838599f0877213a998d983fe18433b8b09df48e974e15dd9b97fb0a11af873c367e2908558bd48fe9184627a48ab5c79ffaed5
|
data/lib/backports/3.2.0/data.rb
CHANGED
@@ -50,15 +50,10 @@ unless ::Backports::Data.respond_to?(:define)
|
|
50
50
|
class << klass
|
51
51
|
def new(*values, **named_values)
|
52
52
|
if named_values.empty?
|
53
|
-
|
54
|
-
when -1
|
55
|
-
missing = members[values.size..-1].map(:inspect).join(", ")
|
56
|
-
raise ArgumentError, "Missing keywords: #{missing}"
|
57
|
-
when +1
|
53
|
+
if values.size > members.size
|
58
54
|
raise ArgumentError, "wrong number of arguments (given #{values.size}, expected 0..#{members.size})"
|
59
|
-
when 0
|
60
|
-
super(**members.zip(values).to_h)
|
61
55
|
end
|
56
|
+
super(**members.first(values.size).zip(values).to_h)
|
62
57
|
else
|
63
58
|
unless values.empty?
|
64
59
|
raise ArgumentError, "wrong number of arguments (given #{values.size}, expected 0)"
|
data/lib/backports/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Backports
|
2
|
-
VERSION = "3.24.
|
2
|
+
VERSION = "3.24.1" unless Backports.constants.include? :VERSION # the guard is against a redefinition warning that happens on Travis
|
3
3
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: backports
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.24.
|
4
|
+
version: 3.24.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc-André Lafortune
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Essential backports that enable many of the nice features of Ruby for
|
14
14
|
earlier versions.
|