summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2024-06-20 13:25:30 -0400
committerPeter Zhu <[email protected]>2024-06-21 11:49:01 -0400
commit90763e04ba2200f96a485d2ef3bb56817ae1b2db ()
treea5b9327ee455e0ab5ff25487f348aff3e39f98a6 /ruby.c
parentbd583ca645ea348a2894f4227fcb1af650ee8dec (diff)
Load external GC using command line argument
This commit changes the external GC to be loaded with the `--gc-library` command line argument instead of the RUBY_GC_LIBRARY_PATH environment variable because @nobu pointed out that loading binaries using environment variables can pose a security risk.
-rw-r--r--ruby.c10
1 files changed, 10 insertions, 0 deletions
@@ -1436,6 +1436,16 @@ proc_long_options(ruby_cmdline_options_t *opt, const char *s, long argc, char **
set_source_encoding_once(opt, s, 0);
}
#endif
else if (strcmp("version", s) == 0) {
if (envopt) goto noenvopt_long;
opt->dump |= DUMP_BIT(version);