shellopts 2.0.0.pre.9 → 2.0.0.pre.11

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: abf197d1a00cb875a6ac80ba5dd672bfdf035778f2e281baa151b61b4ffb4644
4
- data.tar.gz: 2e4f6a91002acbdd0ad2f528305e559606accb5f9b6f2b6610f88851a0cbd981
3
+ metadata.gz: bf9123d8aaeb0abd253cbbb879763200762cbed326eff55afa1bddc5bc6825d8
4
+ data.tar.gz: 78de60189d46a9d9c36d36ac79f754b9cedc820495b69e77171e8839033fda1a
5
5
  SHA512:
6
- metadata.gz: 6297e1adbf0a1a6f9a6c3b1057ae2a9c904cc34f4dfad26ee9ae25f48400476ea128b3c834e23cbe0ed746a1c11a69001c74dcd422ec06eec04b3138b855cbf3
7
- data.tar.gz: bc9b0549d18774cdfac16150693e30b707bae6eb718ee36f8964405a78794335aea39386cb67e5457b7652e276fd244e9f6ec88d73577756e87d7f9490fd80b4
6
+ metadata.gz: 6012864adf0539064c11b700263692cec91a39d8519ec0d11030d586b7ab039f393c5595f07930f0a3e2b27a4418d18e6ee01c01deae0b7f056c9f7162106ae8
7
+ data.tar.gz: a740ce82c8134cfba058df3c0d8abed3cada1abdef0f3b640f75a8af73efee800eb650d70ca41416af9730f55bf317cf3977683d80c69b28aea2578132def4be
@@ -26,12 +26,13 @@ module ShellOpts
26
26
  n_extract = [self.size, range.max].min
27
27
  n_extend = range.max > self.size ? range.max - self.size : 0
28
28
  r = self.shift(n_extract) + Array.new(n_extend)
29
+ range.max <= 1 ? r.first : r
29
30
  else
30
31
  count = count_or_range
31
32
  self.size >= count.abs or inoa(message)
32
33
  start = count >= 0 ? 0 : size + count
33
34
  r = slice!(start, count.abs)
34
- r.size == 0 ? nil : (r.size == 1 ? r.first : r)
35
+ r.size <= 0 ? nil : (r.size == 1 ? r.first : r)
35
36
  end
36
37
  end
37
38
 
@@ -1,3 +1,3 @@
1
1
  module Shellopts
2
- VERSION = "2.0.0.pre.9"
2
+ VERSION = "2.0.0.pre.11"
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.0.0.pre.9
4
+ version: 2.0.0.pre.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-10-06 00:00:00.000000000 Z
11
+ date: 2020-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler