From: "tmm1 (Aman Gupta)" Date: 2013-11-27T13:01:52+09:00 Subject: [ruby-core:58625] [ruby-trunk - Feature #8998] string keys for hash literals should use fstrings Issue #8998 has been updated by tmm1 (Aman Gupta). >+ if (!OBJ_FROZEN(str)) >+ *key = rb_fstring(str); Do you know why the OBJ_FROZEN check is required here? I tried to investigate and it appears this function is sometimes invoked with symbols. ---------------------------------------- Feature #8998: string keys for hash literals should use fstrings https://bugs.ruby-lang.org/issues/8998#change-43194 Author: normalperson (Eric Wong) Status: Open 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/