mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ruby.c (proc_options): enable rubygems if --gem option is given.
* ruby.c (process_options): load rubygems if it is disabled but --gem option is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3be7ed03cd
commit
68ef047b8f
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
Sat Feb 12 01:04:02 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ruby.c (proc_options): enable rubygems if --gem option is given.
|
||||
|
||||
* ruby.c (process_options): load rubygems if it is disabled but
|
||||
--gem option is given.
|
||||
|
||||
Fri Feb 11 23:27:50 2011 Yuki Sonoda (Yugui) <yugui@yugui.jp>
|
||||
|
||||
* ruby.c (proc_options): add --gem=enabled as an alias of
|
||||
|
|
5
ruby.c
5
ruby.c
|
@ -1079,6 +1079,7 @@ proc_options(long argc, char **argv, struct cmdline_options *opt, int envopt)
|
|||
opt->disable &= ~DISABLE_BIT(gems);
|
||||
}
|
||||
else {
|
||||
opt->disable &= ~DISABLE_BIT(gems);
|
||||
add_gems(&opt->req_list, s);
|
||||
}
|
||||
}
|
||||
|
@ -1414,7 +1415,11 @@ process_options(int argc, char **argv, struct cmdline_options *opt)
|
|||
}
|
||||
}
|
||||
if (!(opt->disable & DISABLE_BIT(gems))) {
|
||||
#if defined DISABLE_RUBYGEMS && DISABLE_RUBYGEMS
|
||||
rb_require("rubygems");
|
||||
#else
|
||||
rb_define_module("Gem");
|
||||
#endif
|
||||
}
|
||||
ruby_init_prelude();
|
||||
ruby_set_argv(argc, argv);
|
||||
|
|
Loading…
Reference in a new issue