From 56132b13465c2c766fc15b8c04a7fb116315cd45 Mon Sep 17 00:00:00 2001 From: shirosaki Date: Sun, 25 Nov 2012 13:39:26 +0000 Subject: array.c: refactoring of rb_ary_delete_same() * array.c (ary_resize_smaller): new function to resize array. * array.c (rb_ary_delete): refactoring to extract a function. * array.c (rb_ary_delete_same): refactoring. It renames function, reduces duplicated code and removes unused code. * gc.c (wmap_final_func): follow the above change. * internal.h (rb_ary_delete_same): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37843 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gc.c') diff --git a/gc.c b/gc.c index 45ed0034c2..63869a0542 100644 --- a/gc.c +++ b/gc.c @@ -3752,7 +3752,7 @@ wmap_final_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing) VALUE wmap, ary; if (!existing) return ST_STOP; wmap = (VALUE)arg, ary = (VALUE)*value; - rb_ary_delete_same_obj(ary, wmap); + rb_ary_delete_same(ary, wmap); if (!RARRAY_LEN(ary)) return ST_DELETE; return ST_CONTINUE; } -- cgit v1.2.3