[Bug #19584] Register global variable address before assignment

This commit is contained in:
Nobuyoshi Nakada 2023-04-07 11:21:08 +09:00
parent fb822076d7
commit 5f8ebcada0
No known key found for this signature in database
GPG Key ID: 7CD2805BFA3770C6

2
ruby.c
View File

@ -641,8 +641,8 @@ ruby_init_loadpath(void)
# endif
rb_obj_hide(selfpath);
OBJ_FREEZE_RAW(selfpath);
rb_libruby_selfpath = selfpath;
rb_gc_register_address(&rb_libruby_selfpath);
rb_libruby_selfpath = selfpath;
# endif
#endif