[前][次][番号順一覧][スレッド一覧]

ruby-changes:10371

From: nobu <ko1@a...>
Date: Sat, 31 Jan 2009 18:03:54 +0900 (JST)
Subject: [ruby-changes:10371] Ruby:r21915 (trunk): * lib/optparse.rb (List#accept, parse_in_order): n option is no

nobu	2009-01-31 18:03:43 +0900 (Sat, 31 Jan 2009)

  New Revision: 21915

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21915

  Log:
    * lib/optparse.rb (List#accept, parse_in_order): n option is no
      longer needed.

  Modified files:
    trunk/ChangeLog
    trunk/lib/optparse.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 21914)
+++ ChangeLog	(revision 21915)
@@ -1,3 +1,8 @@
+Sat Jan 31 18:03:41 2009  Nobuyoshi Nakada  <nobu@r...>
+
+	* lib/optparse.rb (List#accept, parse_in_order): n option is no
+	  longer needed.
+
 Sat Jan 31 14:12:43 2009  Tanaka Akira  <akr@f...>
 
 	* lib/pathname.rb (Pathname#each_child): new method.
Index: lib/optparse.rb
===================================================================
--- lib/optparse.rb	(revision 21914)
+++ lib/optparse.rb	(revision 21915)
@@ -528,7 +528,7 @@
     #
     # 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 @@
       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 @@
           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 @@
   #
   # 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]