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
Updated by Anonymous about 7 years ago
- Status changed from Open to Closed
Applied in changeset trunk|r61514.
hash literal deduplicates like Hash#[]=
From: Eric Wong e@80x24.org
- 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
[ruby-core:84554] [Feature #14258]
Actions
Like0
Like0