summaryrefslogtreecommitdiff
path: root/lib/optparse.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r--lib/optparse.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index c4e9ad65d4..8cb29c83e6 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -663,9 +663,10 @@ class OptionParser
# Completion for hash key.
#
def match(key)
- return key, *fetch(key) {
+ *values = fetch(key) {
raise AmbiguousArgument, catch(:ambiguous) {return complete(key)}
}
+ return key, *values
end
end