Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1819 - olleolleolle:patch-1, r=segiddins
RakeBuilder: avoid frozen string issue # Description: This PR adds a missing `#dup` ("convert frozen string literal to a mutable String object instance") in the same way that 45966be did. The problem only appears when there're `args` to `.build`. To trigger this behavior, I duplicated a test and added a variable with a non-empty array of an empty string (to have benign test data). **What it looks like without the fix** Without this change, the user's failure will look like this: ``` Gem::Ext::BuildError: ERROR: Failed to build gem native extension. can't modify frozen String, created at /home/travis/.rvm/rubies/jruby-9.1.7.0/lib/ruby/stdlib/rubygems/ext/rake_builder.rb:11 ``` **Reproduce** To reproduce the issue, write a `mkrf_conf.rb` which calls `build`. Here is an example `ext/mkrf_conf.rb` with a failing build: https://github.com/sickill/rainbow/blob/master/ext/mkrf_conf.rb # Tasks: - [x] Describe the problem / feature - [x] Write tests - [x] Write code to solve the problem - [x] Get code review from coworkers / friends I will abide by the [code of conduct](https://github.com/rubygems/rubygems/blob/master/CODE_OF_CONDUCT.md).
- Loading branch information