diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 15:03:51 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-02-11 15:03:51 +0000 |
commit | f17b469860dcea4186d521c1877cbd790698beeb (patch) | |
tree | e8c97545a45b5b1d32b881a0e9b8761b2a8911c4 /ruby.c | |
parent | 698960439d7234518b1d0493eaf84b03104a91d6 (diff) | |
download | ruby-f17b469860dcea4186d521c1877cbd790698beeb.tar.gz |
* ruby.c (proc_options): add --gem=enabled as an alias of
--enable=gems and --gem=disabled as an alias of --disable=gems.
Gem named "enabled" or "disabled" has already been reserved
legitimately for this purpose.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1072,7 +1072,15 @@ proc_options(long argc, char **argv, struct cmdline_options *opt, int envopt) add_modules(&opt->req_list, s); } else if (is_option_with_arg("gem", Qfalse, Qtrue)) { - add_gems(&opt->req_list, s); + if (strcmp("disabled", s) == 0) { + opt->disable |= DISABLE_BIT(gems); + } + else if (strcmp("enabled", s) == 0) { + opt->disable &= ~DISABLE_BIT(gems); + } + else { + add_gems(&opt->req_list, s); + } } else if (strcmp("version", s) == 0) { if (envopt) goto noenvopt_long; |