From 28b5db007f531a95917a07ed02146fc8360ae104 Mon Sep 17 00:00:00 2001 From: shugo Date: Fri, 19 Aug 2011 02:32:59 +0000 Subject: [PATCH] * lib/net/imap.rb (msg_att): accepts extra space before ')'. based on the patch by art lussos. [Bug #5163] [ruby-core:38820] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/net/imap.rb | 2 +- test/net/imap/test_imap_response_parser.rb | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 694794beb4..66b32ca3e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri Aug 19 11:28:58 2011 Shugo Maeda + + * lib/net/imap.rb (msg_att): accepts extra space before ')'. + based on the patch by art lussos. [Bug #5163] [ruby-core:38820] + Wed Aug 17 23:01:00 2011 Kenta Murata * ext/bigdecimal/bigdecimal.c (cannot_be_coerced_into_BigDecimal): diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 06e1a30094..9095ea399a 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -2170,7 +2170,7 @@ module Net break when T_SPACE shift_token - token = lookahead + next end case token.value when /\A(?:ENVELOPE)\z/ni diff --git a/test/net/imap/test_imap_response_parser.rb b/test/net/imap/test_imap_response_parser.rb index ccdffd21ca..6a5a117408 100644 --- a/test/net/imap/test_imap_response_parser.rb +++ b/test/net/imap/test_imap_response_parser.rb @@ -99,4 +99,21 @@ EOF EOF assert_equal [1, 2, 3], response.data end + + def test_msg_att_extra_space + parser = Net::IMAP::ResponseParser.new + response = parser.parse(<