From d0327a7224d8d778a75c7554b287369895dc17be Mon Sep 17 00:00:00 2001 From: Jean byroot Boussier Date: Wed, 5 Jun 2024 23:54:24 +0200 Subject: Don't add `+YJIT` to `RUBY_DESCRIPTION` until it's actually enabled (#10920) If you start Ruby with `--yjit-disable`, the `+YJIT` shouldn't be added until `RubyVM::YJIT.enable` is actually called. Otherwise it's confusing in crash reports etc. Co-authored-by: Jean Boussier --- ruby.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ruby.c') diff --git a/ruby.c b/ruby.c index a5794199ec..fedb42c743 100644 --- a/ruby.c +++ b/ruby.c @@ -2097,7 +2097,8 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt) #endif #if USE_YJIT if (FEATURE_SET_P(opt->features, yjit)) { - opt->yjit = true; // set opt->yjit for Init_ruby_description() and calling rb_yjit_init() + bool rb_yjit_option_disable(void); + opt->yjit = !rb_yjit_option_disable(); // set opt->yjit for Init_ruby_description() and calling rb_yjit_init() } #endif -- cgit v1.2.3