diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 11:52:46 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-08-30 12:39:31 -0700 |
commit | b5b3afadfab4072f55320075ccac6afe333a140c (patch) | |
tree | 5ef3c93b7e766c9c634ee7f4c0d040ee9b18b441 /lib/bundler | |
parent | 856bb3c35d5d81481b2e5dd00353298e8a0c2ee7 (diff) | |
download | ruby-b5b3afadfab4072f55320075ccac6afe333a140c.tar.gz |
Fix a couple of bundler issues with keyword argument separation
There are more issues than this, but hopefully this is enough
to get make test-bundler passing in CI.
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/vendor/thor/lib/thor.rb | 7 |
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) |