diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-30 00:00:23 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-12-30 00:00:23 +0000 |
commit | fc939f669730844b47e761b11e0f7058f113031f (patch) | |
tree | 8964cc9540122e2f985d81c8879494ebad0b840d /internal.h | |
parent | 634a48c5c1eba9d0d663759faf0c2156007a403a (diff) |
hash literal deduplicates like Hash#[]=
From: Eric Wong <[email protected]>
* 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]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 4ccf3218c6..5fe888cd04 100644 --- a/internal.h +++ b/internal.h @@ -1284,6 +1284,7 @@ st_table *rb_init_identtable(void); st_table *rb_init_identtable_with_size(st_index_t size); VALUE rb_hash_compare_by_id_p(VALUE hash); VALUE rb_to_hash_type(VALUE obj); +VALUE rb_hash_key_str(VALUE); #define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h) VALUE rb_hash_keys(VALUE hash); |