зеркало из https://github.com/github/ruby.git
ruby.c: disable DidYouMean as gem
* ruby.c (process_options): as DidYouMean requires Rubygems, disable the former when the latter is disabled too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e70cad6091
Коммит
e39b2cff8a
6
ruby.c
6
ruby.c
|
@ -1690,9 +1690,9 @@ process_options(int argc, char **argv, ruby_cmdline_options_t *opt)
|
|||
Init_ext(); /* load statically linked extensions before rubygems */
|
||||
if (opt->features & FEATURE_BIT(gems)) {
|
||||
rb_define_module("Gem");
|
||||
}
|
||||
if (opt->features & FEATURE_BIT(did_you_mean)) {
|
||||
rb_define_module("DidYouMean");
|
||||
if (opt->features & FEATURE_BIT(did_you_mean)) {
|
||||
rb_define_module("DidYouMean");
|
||||
}
|
||||
}
|
||||
ruby_init_prelude();
|
||||
if ((opt->features ^ DEFAULT_FEATURES) & COMPILATION_FEATURES) {
|
||||
|
|
|
@ -151,6 +151,7 @@ class TestRubyOptions < Test::Unit::TestCase
|
|||
assert_in_out_err(%w(--disable), "", [], /missing argument for --disable/)
|
||||
assert_in_out_err(%w(--disable-gems -e) + ['p defined? Gem'], "", ["nil"], [])
|
||||
assert_in_out_err(%w(--disable-did_you_mean -e) + ['p defined? DidYouMean'], "", ["nil"], [])
|
||||
assert_in_out_err(%w(--disable-gems -e) + ['p defined? DidYouMean'], "", ["nil"], [])
|
||||
end
|
||||
|
||||
def test_kanji
|
||||
|
|
Загрузка…
Ссылка в новой задаче