ruby-changes:18820
From: yugui <ko1@a...>
Date: Sat, 12 Feb 2011 00:04:11 +0900 (JST)
Subject: [ruby-changes:18820] Ruby:r30844 (trunk): * ruby.c (proc_options): add --gem=enabled as an alias of
yugui 2011-02-12 00:03:51 +0900 (Sat, 12 Feb 2011) New Revision: 30844 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=30844 Log: * 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. Modified files: trunk/ChangeLog trunk/ruby.c Index: ChangeLog =================================================================== --- ChangeLog (revision 30843) +++ ChangeLog (revision 30844) @@ -1,3 +1,10 @@ +Fri Feb 11 23:27:50 2011 Yuki Sonoda (Yugui) <yugui@y...> + + * 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. + Fri Feb 11 23:17:04 2011 Tanaka Akira <akr@f...> * ext/dl/cfunc.c: parenthesize macro arguments. Index: ruby.c =================================================================== --- ruby.c (revision 30843) +++ ruby.c (revision 30844) @@ -1072,7 +1072,15 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/