Skip to content

Commit

Permalink
Use empty array when spec_settings returns nil
Browse files Browse the repository at this point in the history
If use bundler 1.14.4 with rubygems 2.6.8 and
`Bundler.settings["build.#{spec.name}"]` returns `nil` then we get
error "can't modify frozen literal string" from rubygems[1].
RubyGems 2.6.8 is the default version for Ruby2.4.0.

[1]: https://github.com/rubygems/rubygems/blob/v2.6.8/lib/rubygems/ext/rake_builder.rb#L13

See also ku1ik/rainbow#48
  • Loading branch information
okkez committed Feb 16, 2017
1 parent c7f3d05 commit f9c0e99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bundler/installer/gem_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def spec_settings
end

def install
spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => [spec_settings])
spec.source.install(spec, :force => force, :ensure_builtin_gems_cached => standalone, :build_args => Array(spec_settings))
end

def install_with_settings
Expand Down

0 comments on commit f9c0e99

Please sign in to comment.