From: "tmm1 (Aman Gupta)" Date: 2013-11-29T07:05:04+09:00 Subject: [ruby-core:58669] [ruby-trunk - Feature #8998] string keys for hash literals should use fstrings Issue #8998 has been updated by tmm1 (Aman Gupta). Oops, @ko1 is right. The issue at hand is that fstrings were allowed to be shared strings. With rb_gc_mark(), the shared string was more likely to get marked (due to the mark_stack addition). But there were still cases where the shared string had already been lazy swept by the time the fstring was marked or resurrected. With r43718, we resolved the issue once and for all by disallowing shared fstrings altogether. ---------------------------------------- Feature #8998: string keys for hash literals should use fstrings https://bugs.ruby-lang.org/issues/8998#change-43236 Author: normalperson (Eric Wong) Status: Closed Priority: Low Assignee: Category: core Target version: current: 2.1.0 While we're introducing optimizations from frozen strings, string keys inside hashes should be frozen at the compiler level to prevent duplication. a = { "ABC" => :t } b = { "ABC" => :t } # the following ought to print true p(a.keys[0].object_id == b.keys[0].object_id) This should introduce no incompatibilities and be transparent to users of older rubies. -- http://bugs.ruby-lang.org/