summaryrefslogtreecommitdiff
path: root/lib/bundler/vendor/thor/lib/thor.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/vendor/thor/lib/thor.rb')
-rw-r--r--lib/bundler/vendor/thor/lib/thor.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/bundler/vendor/thor/lib/thor.rb b/lib/bundler/vendor/thor/lib/thor.rb
index 6017ee9ad8..395fad28eb 100644
--- a/lib/bundler/vendor/thor/lib/thor.rb
+++ b/lib/bundler/vendor/thor/lib/thor.rb
@@ -90,9 +90,14 @@ class Bundler::Thor
# ==== Parameters
# Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command.
#
- def map(mappings = nil)
+ def map(mappings = nil, **kw)
@map ||= from_superclass(:map, {})
+ if mappings && !kw.empty?
+ mappings = kw.merge!(mappings)
+ else
+ mappings ||= kw
+ end
if mappings
mappings.each do |key, value|
if key.respond_to?(:each)