From: rr.rosas@... Date: 2015-09-28T19:20:56+00:00 Subject: [ruby-core:70938] [Ruby trunk - Feature #11473] Immutable String literal in Ruby 3 Issue #11473 has been updated by Rodrigo Rosenfeld Rosas. I don't follow your concerns. I've suggested something in an attempt to get the performance improvements when possible while keeping backwards compatibility. That means it should work like it currently does: ~~~ a = b = '' a.object_id == b.object_id # true a << '1' a.object_id == b.object_id # true a == '1' && b == '1' # true ~~~ No surprises at all. It just means that a and b won't get any performance improvements in this case because they will be unfrozen after (a << '1'). But it won't cause any backwards incompatibilities either. The automatic unfreezing that I suggested will indeed unfreeze the string, which means the shared buffer will change, as expected. Why is this a problem if this is indeed the expected behavior to keep backwards compatibility with existing Ruby applications? ---------------------------------------- Feature #11473: Immutable String literal in Ruby 3 https://bugs.ruby-lang.org/issues/11473#change-54299 * Author: Koichi Sasada * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- Matz said "All String literals are immutable (frozen) on Ruby 3". This ticket is place holder to discuss about that. -- https://bugs.ruby-lang.org/