shellopts 2.1.0 → 2.1.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: f1d0ed936b5b28c84361778049101596d995b5b38f9f23be0dc5643f86dc3592
4
- data.tar.gz: d856b85fc55bf2f58b7d5245318e122f3c3508301775d281d579f0acdc0441be
3
+ metadata.gz: 130dd1af11ce3370f270266c9a6b48bda041cdaa195526394b1740e21a5501b8
4
+ data.tar.gz: 51a3b79454a7fcbca825a3a227da2c9349263b9bb321611f69f4047d24dd0d78
5
5
  SHA512:
6
- metadata.gz: 3ebba6fac6a845cc7a71d468db989a34379ead52aeb5ce634df83ea8eafad4a9cfc3bea553fa5d477a2cff50a9e3056865e50490b721a7e3df38094fbdfae102
7
- data.tar.gz: 52403c31f4f35b19b52cb7e41f5cdfb15733b28eeb4e374dbb2f9b0f6f1ebff8085d047342cb3860173e5bfc1fe039c022b40f17e4e2a06c8b88213c393d6617
6
+ metadata.gz: 7444f82972751e540863b31451b6bc2990bb3bc28e6904e2a42fe8dbdd80bf79246a3da29ae3300ff9168fa0f9f85202cd9efdac8d6c1fdc3780e6587c0e4a51
7
+ data.tar.gz: 7b37d02c7f1b006b7d2120f563f6ce7e6e4f56cad2c68e53abd6eb4ec24c7c2b8949448eb79c49e18ae7096355495e49a79c79e36d6133253775f1838fcd20bc
@@ -46,8 +46,8 @@ module ShellOpts
46
46
  end
47
47
  end
48
48
 
49
- # As #extract except it doesn't allow negative counts and that the array is
50
- # expected to be emptied by the operation
49
+ # As #extract except the array is expected to be emptied by the operation.
50
+ # Raise a #inoa exception if count is negative
51
51
  #
52
52
  # #expect raise a ShellOpts::Error exception if the array is not emptied
53
53
  # by the operation
@@ -57,7 +57,7 @@ module ShellOpts
57
57
  when Range
58
58
  count_or_range === self.size or inoa(message)
59
59
  when Integer
60
- count_or_range >= 0 or raise ArgumentError, "Count can't be negative"
60
+ count_or_range >= 0 or inoa(message)
61
61
  count_or_range.abs == self.size or inoa(message)
62
62
  end
63
63
  extract(count_or_range) # Can't fail
@@ -1,3 +1,3 @@
1
1
  module ShellOpts
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellopts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-07-20 00:00:00.000000000 Z
11
+ date: 2022-07-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: forward_to