Project

General

Profile

Actions

Bug #18066

closed

Load did_you_mean/error_highlight even with --disable-gems

Added by vo.x (Vit Ondruch) over 2 years ago. Updated over 2 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [x86_64-linux]
[ruby-core:104831]

Description

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:

    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)

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0