summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-22 08:17:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-22 08:17:24 +0000
commit88cbfc0d10f6d449a41127db365389951b87ee51 (patch)
treeb8c7aa633476a2320c1e137012f0dbe3dd74476b
parentc29b274b2ab85d00377c84e37467c9ba94b9497d (diff)
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
-rw-r--r--array.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/array.c b/array.c
index 4775472..9884092 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