summaryrefslogtreecommitdiff
path: root/ruby.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-06-05 11:52:16 +0200
committerJean Boussier <[email protected]>2024-06-05 20:53:49 +0200
commit33f92b3c88e8f03ec2aaf9db762e1eea845bee10 (patch)
treecc4410fabdc50d75d3ff6ed687a95156c6111a37 /ruby.c
parentfa038f838f5c3b5a8d19b867a4ea66769f61f17a (diff)
Don't add `+YJIT` to `RUBY_DESCRIPTION` until it's actually enabled
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.
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 a8de48d2a6..2c7e3285a7 100644
--- a/ruby.c
+++ b/ruby.c
@@ -2302,7 +2302,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