From: v.ondruch@... Date: 2021-08-11T17:26:50+00:00 Subject: [ruby-core:104887] [Ruby master Bug#18066] Load did_you_mean/error_highlight even with --disable-gems Issue #18066 has been updated by vo.x (Vit Ondruch). Just for the context, this issue was triggered when looking at [1]. And as long as there is `ruby --disable-gems` as well as `./configure --disable-rubygems`, I believe that it is correct to fix this. [1]: https://github.com/rubygems/rubygems/pull/4824 ---------------------------------------- Bug #18066: Load did_you_mean/error_highlight even with --disable-gems https://bugs.ruby-lang.org/issues/18066#change-93246 * Author: vo.x (Vit Ondruch) * Status: Open * 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: