summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/optparse.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 0548a29cac..e52d5d2759 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -996,7 +996,7 @@ class OptionParser
end
private :notwice
- SPLAT_PROC = proc {|*a| a}
+ SPLAT_PROC = proc {|*a| a.length <= 1 ? a.first : a}
#
# Creates an OptionParser::Switch from the parameters. The parsed argument
# value is passed to the given block, where it can be processed.