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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8beaceec7c1ff3819b478521aa32a3777d2ea56a514ba9cb1431c5f89b27dd72
4
- data.tar.gz: 228023f65abde2103588059a8b5ab2d882bc3616a9033fa3f3398cecabd4cc5d
3
+ metadata.gz: e2a822b77667d9e87ca05ecb722dc91204f4ef72e88575b534d969bd0c2784f1
4
+ data.tar.gz: 47bb61fa96fde1da093d230fd7fab4f45dfbe58bf89ac1db56dceb9d0525a7e0
5
5
  SHA512:
6
- metadata.gz: ea8d7a6e510d0da24ca48a43436956c231800e651f55d439e6568f0859fb33366879df4179f41fab8a343f636c9c90784161931feb70d70a59d1ac4e937f8d59
7
- data.tar.gz: 684267e5d459a983d616e5a6ed67fbe29fc4df0ed0b6c46610a07d4b5b5953d015f122aff10b91dc055cef72ef013458c2f66a9ff14ee39da22b3c8941d44279
6
+ metadata.gz: 45939ddca1b04d95d536e652780205d8e53fd154705ce0d28fa79abcaedd628375e81abe5972638edf3d57cdf874426c8b8756156a4f6691c1682843dbdf0ad1
7
+ data.tar.gz: 9e0f10a128b5871c015beb2c77838599f0877213a998d983fe18433b8b09df48e974e15dd9b97fb0a11af873c367e2908558bd48fe9184627a48ab5c79ffaed5
@@ -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
- case values.size <=> members.size
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)"
@@ -1,3 +1,3 @@
1
1
  module Backports
2
- VERSION = "3.24.0" unless Backports.constants.include? :VERSION # the guard is against a redefinition warning that happens on Travis
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.0
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-03-07 00:00:00.000000000 Z
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.