From: duerst@... Date: 2021-08-10T23:49:10+00:00 Subject: [ruby-core:104870] [Ruby master Bug#18066] Load did_you_mean/error_highlight even with --disable-gems Issue #18066 has been updated by duerst (Martin D�rst). I'm not sure how strongly this is related (and I'll create a new issue if necessary), but when I use a very simple script such as `ruby -e 'puts 3+4'`, I get the following output: ``` `RubyGems' were not loaded. `error_highlight' was not loaded. `did_you_mean' was not loaded. 7 ``` I think this is total overkill. Don't get me wrong: I'm fine (in this specific case) with RubyGems not being loaded (because no Gems are needed). I'm also fine with error_highlight and did_you_mean not being loaded (because they are not needed as long as my script has no errors). But it's total overkill that I'm told about this with 3 lines when all I want is to run a tiny script. If this is a transitory state, then please ignore this complaint. (ruby -v: ruby 3.1.0dev (2021-08-10T10:08:38Z master 28d03ee776) [x86_64-linux] on WSL2 on Win10) ---------------------------------------- Bug #18066: Load did_you_mean/error_highlight even with --disable-gems https://bugs.ruby-lang.org/issues/18066#change-93227 * 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: