* lib/benchmark.rb: Fix indentation.
* lib/net/imap.rb: Fix indentation of regular expressions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f535b33f8d
commit
b205e55953
@ -1,3 +1,8 @@
|
|||||||
|
Thu May 19 07:06:56 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* lib/benchmark.rb: Fix indentation.
|
||||||
|
* lib/net/imap.rb: Fix indentation of regular expressions.
|
||||||
|
|
||||||
Thu May 19 06:36:11 2011 Eric Hodel <drbrain@segment7.net>
|
Thu May 19 06:36:11 2011 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
* lib/net/imap.rb: Fix indentation of EOF for heredoc.
|
* lib/net/imap.rb: Fix indentation of EOF for heredoc.
|
||||||
|
@ -254,9 +254,9 @@ module Benchmark
|
|||||||
puts 'Rehearsal '.ljust(width+CAPTION.length,'-')
|
puts 'Rehearsal '.ljust(width+CAPTION.length,'-')
|
||||||
ets = job.list.inject(Tms.new) { |sum,(label,item)|
|
ets = job.list.inject(Tms.new) { |sum,(label,item)|
|
||||||
print label.ljust(width)
|
print label.ljust(width)
|
||||||
res = Benchmark.measure(&item)
|
res = Benchmark.measure(&item)
|
||||||
print res.format
|
print res.format
|
||||||
sum + res
|
sum + res
|
||||||
}.format("total: %tsec")
|
}.format("total: %tsec")
|
||||||
print " #{ets}\n\n".rjust(width+CAPTION.length+2,'-')
|
print " #{ets}\n\n".rjust(width+CAPTION.length+2,'-')
|
||||||
|
|
||||||
|
@ -2032,43 +2032,43 @@ module Net
|
|||||||
T_TEXT = :TEXT
|
T_TEXT = :TEXT
|
||||||
|
|
||||||
BEG_REGEXP = /\G(?:\
|
BEG_REGEXP = /\G(?:\
|
||||||
(?# 1: SPACE )( +)|\
|
(?# 1: SPACE )( +)|\
|
||||||
(?# 2: NIL )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
|
(?# 2: NIL )(NIL)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
|
||||||
(?# 3: NUMBER )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
|
(?# 3: NUMBER )(\d+)(?=[\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+])|\
|
||||||
(?# 4: ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+]+)|\
|
(?# 4: ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*#{'"'}\\\[\]+]+)|\
|
||||||
(?# 5: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
|
(?# 5: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
|
||||||
(?# 6: LPAR )(\()|\
|
(?# 6: LPAR )(\()|\
|
||||||
(?# 7: RPAR )(\))|\
|
(?# 7: RPAR )(\))|\
|
||||||
(?# 8: BSLASH )(\\)|\
|
(?# 8: BSLASH )(\\)|\
|
||||||
(?# 9: STAR )(\*)|\
|
(?# 9: STAR )(\*)|\
|
||||||
(?# 10: LBRA )(\[)|\
|
(?# 10: LBRA )(\[)|\
|
||||||
(?# 11: RBRA )(\])|\
|
(?# 11: RBRA )(\])|\
|
||||||
(?# 12: LITERAL )\{(\d+)\}\r\n|\
|
(?# 12: LITERAL )\{(\d+)\}\r\n|\
|
||||||
(?# 13: PLUS )(\+)|\
|
(?# 13: PLUS )(\+)|\
|
||||||
(?# 14: PERCENT )(%)|\
|
(?# 14: PERCENT )(%)|\
|
||||||
(?# 15: CRLF )(\r\n)|\
|
(?# 15: CRLF )(\r\n)|\
|
||||||
(?# 16: EOF )(\z))/ni
|
(?# 16: EOF )(\z))/ni
|
||||||
|
|
||||||
DATA_REGEXP = /\G(?:\
|
DATA_REGEXP = /\G(?:\
|
||||||
(?# 1: SPACE )( )|\
|
(?# 1: SPACE )( )|\
|
||||||
(?# 2: NIL )(NIL)|\
|
(?# 2: NIL )(NIL)|\
|
||||||
(?# 3: NUMBER )(\d+)|\
|
(?# 3: NUMBER )(\d+)|\
|
||||||
(?# 4: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
|
(?# 4: QUOTED )"((?:[^\x00\r\n"\\]|\\["\\])*)"|\
|
||||||
(?# 5: LITERAL )\{(\d+)\}\r\n|\
|
(?# 5: LITERAL )\{(\d+)\}\r\n|\
|
||||||
(?# 6: LPAR )(\()|\
|
(?# 6: LPAR )(\()|\
|
||||||
(?# 7: RPAR )(\)))/ni
|
(?# 7: RPAR )(\)))/ni
|
||||||
|
|
||||||
TEXT_REGEXP = /\G(?:\
|
TEXT_REGEXP = /\G(?:\
|
||||||
(?# 1: TEXT )([^\x00\r\n]*))/ni
|
(?# 1: TEXT )([^\x00\r\n]*))/ni
|
||||||
|
|
||||||
RTEXT_REGEXP = /\G(?:\
|
RTEXT_REGEXP = /\G(?:\
|
||||||
(?# 1: LBRA )(\[)|\
|
(?# 1: LBRA )(\[)|\
|
||||||
(?# 2: TEXT )([^\x00\r\n]*))/ni
|
(?# 2: TEXT )([^\x00\r\n]*))/ni
|
||||||
|
|
||||||
CTEXT_REGEXP = /\G(?:\
|
CTEXT_REGEXP = /\G(?:\
|
||||||
(?# 1: TEXT )([^\x00\r\n\]]*))/ni
|
(?# 1: TEXT )([^\x00\r\n\]]*))/ni
|
||||||
|
|
||||||
Token = Struct.new(:symbol, :value)
|
Token = Struct.new(:symbol, :value)
|
||||||
|
|
||||||
def response
|
def response
|
||||||
token = lookahead
|
token = lookahead
|
||||||
@ -2932,11 +2932,11 @@ module Net
|
|||||||
end
|
end
|
||||||
|
|
||||||
ADDRESS_REGEXP = /\G\
|
ADDRESS_REGEXP = /\G\
|
||||||
(?# 1: NAME )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
(?# 1: NAME )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
||||||
(?# 2: ROUTE )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
(?# 2: ROUTE )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
||||||
(?# 3: MAILBOX )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
(?# 3: MAILBOX )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)") \
|
||||||
(?# 4: HOST )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\
|
(?# 4: HOST )(?:NIL|"((?:[^\x80-\xff\x00\r\n"\\]|\\["\\])*)")\
|
||||||
\)/ni
|
\)/ni
|
||||||
|
|
||||||
def address
|
def address
|
||||||
match(T_LPAR)
|
match(T_LPAR)
|
||||||
@ -2999,8 +2999,8 @@ module Net
|
|||||||
# end
|
# end
|
||||||
|
|
||||||
FLAG_REGEXP = /\
|
FLAG_REGEXP = /\
|
||||||
(?# FLAG )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\
|
(?# FLAG )\\([^\x80-\xff(){ \x00-\x1f\x7f%"\\]+)|\
|
||||||
(?# ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n
|
(?# ATOM )([^\x80-\xff(){ \x00-\x1f\x7f%*"\\]+)/n
|
||||||
|
|
||||||
def flag_list
|
def flag_list
|
||||||
if @str.index(/\(([^)]*)\)/ni, @pos)
|
if @str.index(/\(([^)]*)\)/ni, @pos)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user