From: akr@... Date: 2015-12-02T04:10:33+00:00 Subject: [ruby-core:71791] [Ruby trunk - Bug #11759] URI breaks with frozen strings Issue #11759 has been updated by Akira Tanaka. Don't mix optimization and incompatible change. Incompatible change should be separated to another feature ticket. Don't assume global "mode" for frozen-string-literal: true/false. This comment is specified for each file. So, what library uses frozen-string-literal:true doesn't mean applications uses frozen-string-literal:true. ---------------------------------------- Bug #11759: URI breaks with frozen strings https://bugs.ruby-lang.org/issues/11759#change-55200 * Author: Mike Perham * Status: Open * Priority: Normal * Assignee: * ruby -v: 2.3.0-preview1 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- It appears URI uses String mutation and breaks frozen string mode. ~~~ $ RUBYOPT="--enable-frozen-string-literal" bundle exec rake /Users/mike/.rubies/ruby-2.3.0-preview1/lib/ruby/2.3.0/uri/generic.rb:1344:in `to_s': can't modify frozen String (RuntimeError) /Users/mike/.gem/ruby/2.3.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:257:in `normalize_uri' /Users/mike/.gem/ruby/2.3.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:198:in `add_remote' /Users/mike/.gem/ruby/2.3.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:25:in `block in initialize' /Users/mike/.gem/ruby/2.3.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:25:in `reverse_each' /Users/mike/.gem/ruby/2.3.0/gems/bundler-1.10.6/lib/bundler/source/rubygems.rb:25:in `initialize' ~~~ ---Files-------------------------------- 0001-Do-not-mutate-strings-in-URI-to_s.patch (1.76 KB) -- https://bugs.ruby-lang.org/