Update warning flags before dump

This commit is contained in:
Nobuyoshi Nakada 2024-02-20 23:03:13 +09:00
parent bcfcdae58e
commit 835fa98a62
2 changed files with 4 additions and 2 deletions

4
ruby.c
View file

@ -1739,6 +1739,8 @@ Init_extra_exts(void)
static void
ruby_opt_init(ruby_cmdline_options_t *opt)
{
rb_warning_category_update(opt->warn.mask, opt->warn.set);
if (opt->dump & dump_exit_bits) return;
if (FEATURE_SET_P(opt->features, gems)) {
@ -1754,8 +1756,6 @@ ruby_opt_init(ruby_cmdline_options_t *opt)
}
}
rb_warning_category_update(opt->warn.mask, opt->warn.set);
/* [Feature #19785] Warning for removed GC environment variable.
* Remove this in Ruby 3.4. */
if (getenv("RUBY_GC_HEAP_INIT_SLOTS")) {