shellopts 2.5.0 → 2.5.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: dc8c49d6d58b38a3fdff578630ef13abe8f3c6c5939cf5ff8098198eb8a17fbe
4
- data.tar.gz: 181c71564cd5a755bc3e17a19652748b8a276c2cd910a25c1f8d3d39bd6d27c6
3
+ metadata.gz: 6ff7cb2ce9ba5f03f921c602b81c179c185193d6e26eb9b39d34f54bed30c3bd
4
+ data.tar.gz: c18bf6c16327031b7228960649a88ef9d08638ec2e0bfadaf23ebcd49e29baab
5
5
  SHA512:
6
- metadata.gz: c6fb75cc8baf4738276d25ebddb0dd7827ff816cd124486e5ac681f3fe2d9f80aee1bd9bc2d409eec4e65d476d897c481505f95ca60eb27b70259aac548657b1
7
- data.tar.gz: ef3e4129aea6baab3b683b25c51bd77d0df222c0cfb18effc0b26e9d8497e66fc2735c32e53e1b67030030824e78bc4fe59c7fd8f17d6e0c8daffb31949f9434
6
+ metadata.gz: a517100a6152d7f0238367d6c7c95e0d92c982f6aff3d4888458b00513cb4e30f3320305f9ee3fd273b24bc8a88eddc5a0b6200e673717db896def4902dcd703
7
+ data.tar.gz: 895a4e62108e62106fcc644706a0c4cbd4bda973fb38d62ac473f0c50dda7439061357427f9a281f687ba4fc70e20d7eaab5e4910fbfb0bb0bba11529e7aae3d
@@ -292,7 +292,11 @@ module ShellOpts
292
292
  if option.repeatable?
293
293
  (@__option_hash__[ident] ||= []) << option
294
294
  if option.argument?
295
- (@__option_values__[ident] ||= []) << option.argument
295
+ if option.list? # Repeated list values are flattened
296
+ (@__option_values__[ident] ||= []).concat(option.argument)
297
+ else
298
+ (@__option_values__[ident] ||= []) << option.argument
299
+ end
296
300
  else
297
301
  @__option_values__[ident] = (@__option_values__[ident] || 0) + 1
298
302
  end
@@ -1,3 +1,3 @@
1
1
  module ShellOpts
2
- VERSION = "2.5.0"
2
+ VERSION = "2.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shellopts
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen