From 3e759ed78d99193260ddda9b8dd80bc5710509fc Mon Sep 17 00:00:00 2001 From: ko1 Date: Fri, 15 Aug 2014 10:39:27 +0000 Subject: [PATCH] * iseq.c (rb_iseq_clone): Should not insert write barrier from non-RVALUE data (to non-RVALUE data, of course). Ruby 2.1 also has a same problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ iseq.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 27652ffc82..8430e944d0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Aug 15 19:38:00 2014 Koichi Sasada + + * iseq.c (rb_iseq_clone): Should not insert write barrier from + non-RVALUE data (to non-RVALUE data, of course). + + Ruby 2.1 also has a same problem. + Fri Aug 15 19:34:33 2014 Koichi Sasada * string.c (setup_fake_str): fake strings should not set class by diff --git a/iseq.c b/iseq.c index 4e11679ed8..1eed85ba33 100644 --- a/iseq.c +++ b/iseq.c @@ -1941,7 +1941,7 @@ rb_iseq_clone(VALUE iseqval, VALUE newcbase) if (iseq0->cref_stack->nd_next) { RB_OBJ_WRITE(iseq1->cref_stack, &iseq1->cref_stack->nd_next, iseq0->cref_stack->nd_next); } - RB_OBJ_WRITE(iseq1, &iseq1->klass, newcbase); + RB_OBJ_WRITE(iseq1->self, &iseq1->klass, newcbase); } return newiseq;