Actions
Bug #11798
closedMkConfig breaks with frozen strings
Status:
Closed
Assignee:
-
Target version:
-
ruby -v:
ruby 2.3.0dev (2015-12-10 trunk 53014) [x86_64-darwin15]
Description
It seems MkConfig(RbConfig) breaks frozen strings mode
/Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:249:in `replace': can't modify frozen String, created at /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:21 (RuntimeError)
from /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:249:in `expand'
from /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:253:in `block in <module:RbConfig>'
from /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:252:in `each_value'
from /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:252:in `<module:RbConfig>'
from /Users/deepj/.rubies/ruby-2.3.0-dev/lib/ruby/2.3.0/x86_64-darwin15/rbconfig.rb:6:in `<top (required)>'
from /Users/deepj/dev/oss/rubygems/lib/rubygems.rb:8:in `require'
from /Users/deepj/dev/oss/rubygems/lib/rubygems.rb:8:in `<top (required)>'
from -e:1:in `require'
from -e:1:in `<main>'
rake aborted!
The problem lies at https://github.com/ruby/ruby/blob/ce9b056c5d37ad7760049550b269139f72bdfcfb/tool/mkconfig.rb#L270
Files
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
- Status changed from Open to Closed
Applied in changeset r53017.
mkconfig.rb: must not be frozen
- tool/mkconfig.rb: rbconfig must not be fronzen-string-literal to
expand CONFIG hash. [ruby-core:72006] [Bug #11798]
Updated by deepj (deepj #) about 9 years ago
- File mkconfig.patch mkconfig.patch added
Hi Nobu, I offer this alternative patch. What do you think?
Updated by nobu (Nobuyoshi Nakada) about 9 years ago
RbConfig.expand
has to modify the argument destructively.
Actions
Like0
Like0Like0Like0