summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorJean byroot Boussier <jean.boussier+github@shopify.com>2024-06-05 23:54:24 +0200
committerGitHub <noreply@github.com>2024-06-05 14:54:24 -0700
commitd0327a7224d8d778a75c7554b287369895dc17be (patch)
tree9096371d566368a724628aca0805f65f566441e1 /ruby.c
parente0fe6f70170924397b957d6cfa84774592b1c809 (diff)
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 <jean.boussier@gmail.com>
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c3
1 files changed, 2 insertions, 1 deletions
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