summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 09:03:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-31 09:03:43 +0000
commit53ca429e33af2028c9df84496eb1f2d249696589 (patch)
treef2271b4bbb5ac780f5f0c0d5fa1b94a246775c5d /lib
parent099ca05ed612cfbc10e67404f919457e63d6a944 (diff)
downloadruby-53ca429e33af2028c9df84496eb1f2d249696589.tar.gz
ruby-53ca429e33af2028c9df84496eb1f2d249696589.tar.xz
ruby-53ca429e33af2028c9df84496eb1f2d249696589.zip
* lib/optparse.rb (List#accept, parse_in_order): n option is no
longer needed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@21915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r--lib/optparse.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb
index 0397382a6..9c6b3924f 100644
--- a/lib/optparse.rb
+++ b/lib/optparse.rb
@@ -528,7 +528,7 @@ class OptionParser
#
# See OptionParser.accept.
#
- def accept(t, pat = /.*/nm, &block)
+ def accept(t, pat = /.*/m, &block)
if pat
pat.respond_to?(:match) or
raise TypeError, "has no `match'", ParseError.filter_backtrace(caller(2))
@@ -1259,7 +1259,7 @@ class OptionParser
while arg = argv.shift
case arg
# long option
- when /\A--([^=]*)(?:=(.*))?/nm
+ when /\A--([^=]*)(?:=(.*))?/m
opt, rest = $1, $2
begin
sw, = complete(:long, opt, true)
@@ -1275,7 +1275,7 @@ class OptionParser
end
# short option
- when /\A-(.)((=).*|.+)?/nm
+ when /\A-(.)((=).*|.+)?/m
opt, has_arg, eq, val, rest = $1, $3, $3, $2, $2
begin
sw, = search(:short, opt)
@@ -1502,7 +1502,7 @@ class OptionParser
#
# Any non-empty string, and no conversion.
#
- accept(String, /.+/nm) {|s,*|s}
+ accept(String, /.+/m) {|s,*|s}
#
# Ruby/C-like integer, octal for 0-7 sequence, binary for 0b, hexadecimal