From: "mame (Yusuke Endoh)" Date: 2021-10-25T09:05:58+00:00 Subject: [ruby-core:105779] [Ruby master Bug#18066] Load did_you_mean/error_highlight even with --disable-gems Issue #18066 has been updated by mame (Yusuke Endoh). Status changed from Open to Rejected We discussed this ticket at the dev-meeting, and @matz rejected this. Now the `--disable-gems` option is just for debugging, not for casual users. We, the core developers, mainly use the option to investigate the startup overhead of the interpreter core, so typically we want to disable did_you_mean and error_highglight when we use `--disable-gems`. If we really want to enable did_you_mean under `--disable-gems`, we can use `--disable-gems -rdid_you_mean`. ---------------------------------------- Bug #18066: Load did_you_mean/error_highlight even with --disable-gems https://bugs.ruby-lang.org/issues/18066#change-94293 * Author: vo.x (Vit Ondruch) * Status: Rejected * Priority: Normal * ruby -v: ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux] * Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN ---------------------------------------- I guess that did_you_mean was not possible to load without RubyGems, when it used to be bundled gem. Since it is default gem, therefore part of StdLib and always available on load path, it should not be related to --disable-gems anymore. IOW ruby.c contains this code: ~~~ruby if (opt->features.set & FEATURE_BIT(gems)) { rb_define_module("Gem"); if (opt->features.set & FEATURE_BIT(error_highlight)) { rb_define_module("ErrorHighlight"); } if (opt->features.set & FEATURE_BIT(did_you_mean)) { rb_define_module("DidYouMean"); } } ~~~ while it should look like: ~~~ if (opt->features.set & FEATURE_BIT(gems)) { rb_define_module("Gem"); } if (opt->features.set & FEATURE_BIT(error_highlight)) { rb_define_module("ErrorHighlight"); } if (opt->features.set & FEATURE_BIT(did_you_mean)) { rb_define_module("DidYouMean"); } ~~~ (I have not checked error_highlight, but I assume it behaves similarly to did_you_mean) -- https://bugs.ruby-lang.org/ Unsubscribe: