Actions
Feature #14258
closed[PATCH] hash literal deduplicates like Hash#[]=
Status:
Closed
Assignee:
-
Target version:
-
Description
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
Actions
Like0
Like0