Last active
December 13, 2015 18:08
-
-
Save k-tsj/4953202 to your computer and use it in GitHub Desktop.
Bug #7825
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/vm.c b/vm.c | |
| index 36def2c..89314c7 100644 | |
| --- a/vm.c | |
| +++ b/vm.c | |
| @@ -1782,7 +1782,14 @@ rb_thread_mark(void *ptr) | |
| if (iseq) { | |
| rb_gc_mark(RUBY_VM_NORMAL_ISEQ_P(iseq) ? iseq->self : (VALUE)iseq); | |
| } | |
| - if (cfp->me) ((rb_method_entry_t *)cfp->me)->mark = 1; | |
| + if (cfp->me) { | |
| + rb_method_entry_t *me = (rb_method_entry_t *)cfp->me; | |
| + rb_method_definition_t *def = me->def; | |
| + me->mark = 1; | |
| + if (def->type == VM_METHOD_TYPE_BMETHOD) { | |
| + rb_gc_mark(def->body.proc); | |
| + } | |
| + } | |
| cfp = RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment