From 88cbfc0d10f6d449a41127db365389951b87ee51 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 22 Sep 2014 08:17:24 +0000 Subject: array.c: GC guard * array.c (rb_ary_splice): prevent replacing array from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47683 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- array.c | 1 + 1 file changed, 1 insertion(+) (limited to 'array.c') diff --git a/array.c b/array.c index 4775472221..9884092ebe 100644 --- a/array.c +++ b/array.c @@ -1606,6 +1606,7 @@ rb_ary_splice(VALUE ary, long beg, long len, VALUE rpl) MEMMOVE(RARRAY_PTR(ary) + beg, RARRAY_CONST_PTR(rpl), VALUE, rlen); } } + RB_GC_GUARD(rpl); } void -- cgit v1.2.3