From: normalperson@... Date: 2017-12-29T08:51:02+00:00 Subject: [ruby-core:84554] [Ruby trunk Feature#14258] [PATCH] hash literal deduplicates like Hash#[]= Issue #14258 has been reported by normalperson (Eric Wong). ---------------------------------------- Feature #14258: [PATCH] hash literal deduplicates like Hash#[]= https://bugs.ruby-lang.org/issues/14258 * Author: normalperson (Eric Wong) * Status: Open * Priority: Normal * Assignee: * Target version: ---------------------------------------- ``` We should reuse the same hash key deduplication logic as Hash#[]= when creating hash literals using the newhash VM instruction. * hash.c (rb_hash_key_str): new function (hash_aset_str): use rb_hash_key_str * internal.h: add rb_hash_key_str * st.c (st_stringify): use rb_hash_key_str * test/ruby/test_hash.rb (test_NEWHASH_fstring_key): dynamic key ``` ---Files-------------------------------- 0001-hash-literal-deduplicates-like-Hash.patch (2.7 KB) -- https://bugs.ruby-lang.org/ Unsubscribe: