1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Freeze command line script

This commit is contained in:
Nobuyoshi Nakada 2021-06-10 15:15:35 +09:00
parent 8a46b480a7
commit 791d7d4947
No known key found for this signature in database
GPG key ID: 7CD2805BFA3770C6

1
ruby.c
View file

@ -2051,6 +2051,7 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
rb_gvar_ractor_local("$-a");
if ((rb_e_script = opt->e_script) != 0) {
rb_str_freeze(rb_e_script);
rb_gc_register_mark_object(opt->e_script);
}