summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 15:10:32 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2019-08-26 15:10:32 +0000
commit6e5e5df1bfd971687cb370c4f42226a5fc255dfc (patch)
tree854ff91628279842795fee523b83afa66f42be2e /vm.c
parent522bc8ade996b59a0bfca85cf448a065a37a4777 (diff)
merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887]
Keep vm->orig_progname alive `vm->orig_progname` can be different from `vm->progname` when user code assigns to `$0`. While `vm->progname` is kept alive by the global table, nothing marked `vm->orig_progname`. [Bug #15887] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 5d15734055..bf7bbbf43c 100644
--- a/vm.c
+++ b/vm.c
@@ -2100,6 +2100,7 @@ rb_vm_mark(void *ptr)
rb_gc_mark(vm->loaded_features);
rb_gc_mark(vm->loaded_features_snapshot);
rb_gc_mark(vm->top_self);
+ rb_gc_mark(vm->orig_progname);
RUBY_MARK_UNLESS_NULL(vm->coverages);
rb_gc_mark(vm->defined_module_hash);