shellopts 2.5.0 → 2.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/shellopts/program.rb +5 -1
- data/lib/shellopts/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ff7cb2ce9ba5f03f921c602b81c179c185193d6e26eb9b39d34f54bed30c3bd
|
4
|
+
data.tar.gz: c18bf6c16327031b7228960649a88ef9d08638ec2e0bfadaf23ebcd49e29baab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a517100a6152d7f0238367d6c7c95e0d92c982f6aff3d4888458b00513cb4e30f3320305f9ee3fd273b24bc8a88eddc5a0b6200e673717db896def4902dcd703
|
7
|
+
data.tar.gz: 895a4e62108e62106fcc644706a0c4cbd4bda973fb38d62ac473f0c50dda7439061357427f9a281f687ba4fc70e20d7eaab5e4910fbfb0bb0bba11529e7aae3d
|
data/lib/shellopts/program.rb
CHANGED
@@ -292,7 +292,11 @@ module ShellOpts
|
|
292
292
|
if option.repeatable?
|
293
293
|
(@__option_hash__[ident] ||= []) << option
|
294
294
|
if option.argument?
|
295
|
-
|
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
|
data/lib/shellopts/version.rb
CHANGED