From aa0e51b529f4f06c0d44c4323b65655a024643f9 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 20 Jul 2016 08:35:25 +0000 Subject: hash.c: rb_hash_add_new_element * hash.c (rb_hash_add_new_element): add new element or do nothing if it is contained already. * array.c (ary_add_hash, ary_add_hash_by): use rb_hash_add_new_element. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index b47430cd7d..c59ccc5e19 100644 --- a/internal.h +++ b/internal.h @@ -1049,6 +1049,7 @@ st_table *rb_init_identtable_with_size(st_index_t size); VALUE rb_hash_keys(VALUE hash); VALUE rb_hash_values(VALUE hash); VALUE rb_hash_rehash(VALUE hash); +int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val); #define HASH_DELETED FL_USER1 #define HASH_PROC_DEFAULT FL_USER2 -- cgit v1.2.1