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

ruby-changes:19596

From: drbrain <ko1@a...>
Date: Thu, 19 May 2011 07:07:23 +0900 (JST)
Subject: [ruby-changes:19596] drbrain:r31638 (trunk): * lib/benchmark.rb: Fix indentation.

drbrain	2011-05-19 07:07:09 +0900 (Thu, 19 May 2011)

  New Revision: 31638

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

  Log:
    * lib/benchmark.rb:  Fix indentation.
    * lib/net/imap.rb:  Fix indentation of regular expressions.

  Modified files:
    trunk/ChangeLog
    trunk/lib/benchmark.rb
    trunk/lib/net/imap.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 31637)
+++ ChangeLog	(revision 31638)
@@ -1,3 +1,8 @@
+Thu May 19 07:06:56 2011  Eric Hodel  <drbrain@s...>
+
+	* lib/benchmark.rb:  Fix indentation.
+	* lib/net/imap.rb:  Fix indentation of regular expressions.
+
 Thu May 19 06:36:11 2011  Eric Hodel  <drbrain@s...>
 
 	* lib/net/imap.rb:  Fix indentation of EOF for heredoc.
Index: lib/benchmark.rb
===================================================================
--- lib/benchmark.rb	(revision 31637)
+++ lib/benchmark.rb	(revision 31638)
@@ -254,9 +254,9 @@
     puts 'Rehearsal '.ljust(width+CAPTION.length,'-')
     ets = job.list.inject(Tms.new) { |sum,(label,item)|
       print label.ljust(width)
-    res = Benchmark.measure(&item)
-    print res.format
-    sum + res
+      res = Benchmark.measure(&item)
+      print res.format
+      sum + res
     }.format("total: %tsec")
     print " #{ets}\n\n".rjust(width+CAPTION.length+2,'-')
 
Index: lib/net/imap.rb
===================================================================
--- lib/net/imap.rb	(revision 31637)
+++ lib/net/imap.rb	(revision 31638)
@@ -2032,43 +2032,43 @@
       T_TEXT    = :TEXT
 
       BEG_REGEXP = /\G(?:\
-                       (?# 1:  SPACE   )( +)|\
-                       (?# 2:  NIL     )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
-                         (?# 3:  NUMBER  )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
-                           (?# 4:  ATOM    )([^\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+]+)|\
-                             (?# 5:  QUOTED  )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
-                             (?# 6:  LPAR    )(\()|\
-                                               (?# 7:  RPAR    )(\))|\
-                                               (?# 8:  BSLASH  )(\\)|\
-                                               (?# 9:  STAR    )(\*)|\
-                                               (?# 10: LBRA    )(\[)|\
-                                                 (?# 11: RBRA    )(\])|\
-                                                 (?# 12: LITERAL )\{(\d+)\}\r\n|\
-                                                 (?# 13: PLUS    )(\+)|\
-                                                 (?# 14: PERCENT )(%)|\
-                                                 (?# 15: CRLF    )(\r\n)|\
-                                                 (?# 16: EOF     )(\z))/ni
+(?# 1:  SPACE   )( +)|\
+(?# 2:  NIL     )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
+(?# 3:  NUMBER  )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
+(?# 4:  ATOM    )([^\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+]+)|\
+(?# 5:  QUOTED  )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
+(?# 6:  LPAR    )(\()|\
+(?# 7:  RPAR    )(\))|\
+(?# 8:  BSLASH  )(\\)|\
+(?# 9:  STAR    )(\*)|\
+(?# 10: LBRA    )(\[)|\
+(?# 11: RBRA    )(\])|\
+(?# 12: LITERAL )\{(\d+)\}\r\n|\
+(?# 13: PLUS    )(\+)|\
+(?# 14: PERCENT )(%)|\
+(?# 15: CRLF    )(\r\n)|\
+(?# 16: EOF     )(\z))/ni
 
-                                                 DATA_REGEXP = /\G(?:\
-                                                                   (?# 1:  SPACE   )( )|\
-                                                                   (?# 2:  NIL     )(NIL)|\
-                                                                   (?# 3:  NUMBER  )(\d+)|\
-                                                                   (?# 4:  QUOTED  )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
-                                                                   (?# 5:  LITERAL )\{(\d+)\}\r\n|\
-                                                                   (?# 6:  LPAR    )(\()|\
-                                                                                     (?# 7:  RPAR    )(\)))/ni
+      DATA_REGEXP = /\G(?:\
+(?# 1:  SPACE   )( )|\
+(?# 2:  NIL     )(NIL)|\
+(?# 3:  NUMBER  )(\d+)|\
+(?# 4:  QUOTED  )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
+(?# 5:  LITERAL )\{(\d+)\}\r\n|\
+(?# 6:  LPAR    )(\()|\
+(?# 7:  RPAR    )(\)))/ni
 
-                                                                                     TEXT_REGEXP = /\G(?:\
-                                                                                                       (?# 1:  TEXT    )([^\x00\r\n]*))/ni
+      TEXT_REGEXP = /\G(?:\
+(?# 1:  TEXT    )([^\x00\r\n]*))/ni
 
-                                                                                                       RTEXT_REGEXP = /\G(?:\
-                                                                                                                          (?# 1:  LBRA    )(\[)|\
-                                                                                                                            (?# 2:  TEXT    )([^\x00\r\n]*))/ni
+      RTEXT_REGEXP = /\G(?:\
+(?# 1:  LBRA    )(\[)|\
+(?# 2:  TEXT    )([^\x00\r\n]*))/ni
 
-                                                                                                                            CTEXT_REGEXP = /\G(?:\
-                                                                                                                                               (?# 1:  TEXT    )([^\x00\r\n\]]*))/ni
+      CTEXT_REGEXP = /\G(?:\
+(?# 1:  TEXT    )([^\x00\r\n\]]*))/ni
 
-                                                                                                                                               Token = Struct.new(:symbol, :value)
+      Token = Struct.new(:symbol, :value)
 
       def response
         token = lookahead
@@ -2932,11 +2932,11 @@
       end
 
       ADDRESS_REGEXP = /\G\
-        (?# 1: NAME     )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-        (?# 2: ROUTE    )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-        (?# 3: MAILBOX  )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
-        (?# 4: HOST     )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\
-        \)/ni
+(?# 1: NAME     )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
+(?# 2: ROUTE    )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
+(?# 3: MAILBOX  )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
+(?# 4: HOST     )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\
+\)/ni
 
       def address
         match(T_LPAR)
@@ -2999,8 +2999,8 @@
       #        end
 
       FLAG_REGEXP = /\
-        (?# FLAG        )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\
-          (?# ATOM        )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n
+(?# FLAG        )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\
+(?# ATOM        )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n
 
             def flag_list
               if @str.index(/\(([^)]*)\)/ni, @pos)

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

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