Report unknown --ujit-* options

This commit is contained in:
Maxime Chevalier-Boisvert 2021-01-26 16:19:29 -05:00 committed by Alan Wu
parent b7f93e81df
commit a14015e9b5
2 changed files with 5 additions and 0 deletions

4
ruby.c
View file

@ -1041,6 +1041,10 @@ setup_ujit_options(const char *s, struct rb_ujit_options *ujit_opt)
if (opt_match_noarg(s, l, "stats")) {
ujit_opt->gen_stats = true;
}
else {
rb_raise(rb_eRuntimeError,
"invalid ujit option `%s' (--help will show valid ujit options)", s);
}
}
#if USE_MJIT