From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS4713 221.184.0.0/13 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by dcvr.yhbt.net (Postfix) with ESMTP id 2E0561F8C6 for ; Wed, 11 Aug 2021 10:54:18 +0000 (UTC) Received: from neon.ruby-lang.org (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 30444120B18; Wed, 11 Aug 2021 19:52:39 +0900 (JST) Received: from xtrwkhkc.outbound-mail.sendgrid.net (xtrwkhkc.outbound-mail.sendgrid.net [167.89.16.28]) by neon.ruby-lang.org (Postfix) with ESMTPS id CFC2D120B13 for ; Wed, 11 Aug 2021 19:52:35 +0900 (JST) Received: by filterdrecv-7c9f9f88f-mt88x with SMTP id filterdrecv-7c9f9f88f-mt88x-1-6113AC3E-A 2021-08-11 10:53:50.240028498 +0000 UTC m=+1355644.553925864 Received: from herokuapp.com (unknown) by geopod-ismtpd-1-0 (SG) with ESMTP id SeId7VxHRMKum4LKSrikXQ for ; Wed, 11 Aug 2021 10:53:50.207 +0000 (UTC) Date: Wed, 11 Aug 2021 10:53:50 +0000 (UTC) From: v.ondruch@tiscali.cz Message-ID: References: Mime-Version: 1.0 X-Redmine-Project: ruby-master X-Redmine-Issue-Tracker: Bug X-Redmine-Issue-Id: 18066 X-Redmine-Issue-Author: vo.x X-Redmine-Sender: vo.x X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-Redmine-MailingListIntegration-Message-Ids: 81017 X-SG-EID: =?us-ascii?Q?mWhqNvD1xlBozk4zn6CTHlnSPHlTKkyHJdiOH=2FzC52jNdltqNpmOlrLBsms1dk?= =?us-ascii?Q?z3y0+uQieKFogIFD30IpiHbIc+Ev7HuzWf8tHk=2F?= =?us-ascii?Q?AjCM2AupGUzT07G3Jkp97X2+a1Q32sJ6NcwGTj+?= =?us-ascii?Q?Dlygca4BTTlfGWA5zpHdcARPqVSl1UBU=2FrNZCSA?= =?us-ascii?Q?=2FSAi=2FhL6=2F1c4Nru2vesDQFdoplCEOT3WRFQ=3D=3D?= To: ruby-core@ruby-lang.org X-Entity-ID: b/2+PoftWZ6GuOu3b0IycA== X-ML-Name: ruby-core X-Mail-Count: 104879 Subject: [ruby-core:104879] [Ruby master Bug#18066] Load did_you_mean/error_highlight even with --disable-gems X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #18066 has been updated by vo.x (Vit Ondruch). duerst (Martin D=FCrst) wrote in #note-4: > 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 > ``` Under what conditions you see these reports? This [1] is the place where th= ose comes from, but you also need to have the relevant files removed from S= tdLib. [1]: https://github.com/ruby/ruby/blob/master/gem_prelude.rb ---------------------------------------- Bug #18066: Load did_you_mean/error_highlight even with --disable-gems https://bugs.ruby-lang.org/issues/18066#change-93238 * 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 i= t 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-g= ems 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 d= id_you_mean) -- = https://bugs.ruby-lang.org/ Unsubscribe: