mirror of
https://github.com/ruby/ruby.git
synced 2025-08-23 04:55:21 +02:00
merge revision(s) 25340:
* lib/net/imap.rb (resp_text_code): accepts response codes without text. backported from trunk. [ruby-core:24194] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@25901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1298533806
commit
06b911ea00
3 changed files with 16 additions and 6 deletions
|
@ -2764,11 +2764,16 @@ module Net
|
|||
match(T_SPACE)
|
||||
result = ResponseCode.new(name, number)
|
||||
else
|
||||
match(T_SPACE)
|
||||
@lex_state = EXPR_CTEXT
|
||||
token = match(T_TEXT)
|
||||
@lex_state = EXPR_BEG
|
||||
result = ResponseCode.new(name, token.value)
|
||||
token = lookahead
|
||||
if token.symbol == T_SPACE
|
||||
shift_token
|
||||
@lex_state = EXPR_CTEXT
|
||||
token = match(T_TEXT)
|
||||
@lex_state = EXPR_BEG
|
||||
result = ResponseCode.new(name, token.value)
|
||||
else
|
||||
result = ResponseCode.new(name, nil)
|
||||
end
|
||||
end
|
||||
match(T_RBRA)
|
||||
@lex_state = EXPR_RTEXT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue