Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Fix a couple of bundler issues with keyword argument separation #7337

Merged
1 commit merged into from Sep 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/bundler/vendor/thor/lib/thor.rb
Expand Up @@ -90,9 +90,14 @@ def long_desc(long_description, options = {})
# ==== 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)
Expand Down
7 changes: 4 additions & 3 deletions spec/runtime/inline_spec.rb
Expand Up @@ -88,9 +88,10 @@ def script(code, options = {})
RUBY

expect(out).to include("Installing activesupport")
err.gsub! %r{.*lib/sinatra/base\.rb:\d+: warning: constant ::Fixnum is deprecated$}, ""
err.strip!
expect(err).to be_empty
err.gsub! %r{(.*lib/sinatra/base\.rb:\d+: warning: constant ::Fixnum is deprecated$)}, ""
err_lines = err.split("\n")
err_lines.reject!{|line| line =~ /\.rb:\d+: warning: The last/ }
expect(err_lines).to be_empty
expect(exitstatus).to be_zero if exitstatus
end

Expand Down