diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 09:03:43 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-31 09:03:43 +0000 |
commit | de398e8f6145da7b761a95339fec30273b7df24a (patch) | |
tree | f2271b4bbb5ac780f5f0c0d5fa1b94a246775c5d /lib/optparse.rb | |
parent | fc77d9d1cbfb857a4429627bd58d6c015c6fe133 (diff) |
* lib/optparse.rb (List#accept, parse_in_order): n option is no
longer needed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/optparse.rb')
-rw-r--r-- | lib/optparse.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/optparse.rb b/lib/optparse.rb index 0397382a6b..9c6b3924f0 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 |