summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 3c17a7811a..5e9204bd70 100644
--- a/vm.c
+++ b/vm.c
@@ -1737,6 +1737,8 @@ void rb_vm_trace_mark_event_hooks(rb_hook_list_t *hooks);
void
rb_vm_mark(void *ptr)
{
+ int i;
+
RUBY_MARK_ENTER("vm");
RUBY_GC_INFO("-------------------------------------------------\n");
if (ptr) {
@@ -1764,6 +1766,11 @@ rb_vm_mark(void *ptr)
}
rb_vm_trace_mark_event_hooks(&vm->event_hooks);
+
+ for (i = 0; i < RUBY_NSIG; i++) {
+ if (vm->trap_list[i].cmd)
+ rb_gc_mark(vm->trap_list[i].cmd);
+ }
}
RUBY_MARK_LEAVE("vm");