diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-18 10:43:38 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-18 10:43:38 +0000 |
commit | 7c9904b29ec16ddce76fb167ab20afca4a571476 (patch) | |
tree | 89b6daaa4b631311b89e88131e17043f267a8e03 | |
parent | a474c66f46368ad1ca68f21e89c3bb500daa79bc (diff) |
merges r30659 from trunk into ruby_1_9_2.
--
* class.c (clone_method): add GC guard to prevent intermediate
variable from GC. [Bug #4321] [ruby-dev:43107]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30898 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | class.c | 4 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 9 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Wed Jan 26 22:57:30 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com> + + * class.c (clone_method): add GC guard to prevent intermediate + variable from GC. [Bug #4321] [ruby-dev:43107] + Wed Jan 26 22:28:49 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com> * vm_eval.c (rb_throw_obj): add GC guard to prevent intermediate @@ -127,11 +127,13 @@ VALUE rb_iseq_clone(VALUE iseqval, VALUE newcbase); static int clone_method(ID mid, const rb_method_entry_t *me, struct clone_method_data *data) { + VALUE newiseqval; if (me->def && me->def->type == VM_METHOD_TYPE_ISEQ) { - VALUE newiseqval = rb_iseq_clone(me->def->body.iseq->self, data->klass); rb_iseq_t *iseq; + newiseqval = rb_iseq_clone(me->def->body.iseq->self, data->klass); GetISeqPtr(newiseqval, iseq); rb_add_method(data->klass, mid, VM_METHOD_TYPE_ISEQ, iseq, me->flag); + RB_GC_GUARD(newiseqval); } else { rb_method_entry_set(data->klass, mid, me, me->flag); @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.2" -#define RUBY_PATCHLEVEL 175 +#define RUBY_PATCHLEVEL 176 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 |