From: jaruga@... Date: 2021-08-11T09:54:02+00:00 Subject: [ruby-core:104878] [Ruby master Bug#18066] Load did_you_mean/error_highlight even with --disable-gems Issue #18066 has been updated by jaruga (Jun Aruga). > 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: > ... > 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) I tried to reproduce what you did on the master commit:28d03ee776 . But in my case, I used Fedora 34, as I don't have Windows. And the result looks ok on my environment. ``` $ cat /etc/fedora-release Fedora release 34 (Thirty Four) $ ~/local/ruby-28d03ee776/bin/ruby -v ruby 3.1.0dev (2021-08-10T10:08:38Z master 28d03ee776) [x86_64-linux] $ ~/local/ruby-28d03ee776/bin/ruby -e 'puts 3+4' 7 ``` ---------------------------------------- Bug #18066: Load did_you_mean/error_highlight even with --disable-gems https://bugs.ruby-lang.org/issues/18066#change-93237 * 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: