[ruby-cvs:68695] normal:r61514 (trunk): hash literal deduplicates like Hash#[]=

normal at ruby-lang.org normal at ruby-lang.org
Sat Dec 30 09:00:23 JST 2017


normal	2017-12-30 09:00:23 +0900 (Sat, 30 Dec 2017)

  New Revision: 61514

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61514

  Log:
    hash literal deduplicates like Hash#[]=
    
    From: Eric Wong <e at 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]

  Modified files:
    trunk/hash.c
    trunk/internal.h
    trunk/st.c
    trunk/test/ruby/test_hash.rb


More information about the ruby-cvs mailing list