ruby-changes:29136
From: nagachika <ko1@a...>
Date: Sun, 9 Jun 2013 01:36:26 +0900 (JST)
Subject: [ruby-changes:29136] nagachika:r41188 (ruby_2_0_0): merge revision(s) 41091: [Backport #8415]
nagachika 2013-06-09 01:35:25 +0900 (Sun, 09 Jun 2013) New Revision: 41188 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41188 Log: merge revision(s) 41091: [Backport #8415] * lib/net/imap.rb (capability_response): should ignore trailing spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415] * test/net/imap/test_imap_response_parser.rb: related test. Modified directories: branches/ruby_2_0_0/ Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/lib/net/imap.rb branches/ruby_2_0_0/test/net/imap/test_imap_response_parser.rb branches/ruby_2_0_0/version.h Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 41187) +++ ruby_2_0_0/ChangeLog (revision 41188) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Sun Jun 9 01:30:57 2013 Shugo Maeda <shugo@r...> + + * lib/net/imap.rb (capability_response): should ignore trailing + spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415] + + * test/net/imap/test_imap_response_parser.rb: related test. + Wed Jun 5 00:38:46 2013 Nobuyoshi Nakada <nobu@r...> * ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc), Index: ruby_2_0_0/lib/net/imap.rb =================================================================== --- ruby_2_0_0/lib/net/imap.rb (revision 41187) +++ ruby_2_0_0/lib/net/imap.rb (revision 41188) @@ -2954,6 +2954,7 @@ module Net https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/lib/net/imap.rb#L2954 break when T_SPACE shift_token + next end data.push(atom.upcase) end Index: ruby_2_0_0/version.h =================================================================== --- ruby_2_0_0/version.h (revision 41187) +++ ruby_2_0_0/version.h (revision 41188) @@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/version.h#L1 #define RUBY_VERSION "2.0.0" #define RUBY_RELEASE_DATE "2013-06-09" -#define RUBY_PATCHLEVEL 209 +#define RUBY_PATCHLEVEL 210 #define RUBY_RELEASE_YEAR 2013 #define RUBY_RELEASE_MONTH 6 Index: ruby_2_0_0/test/net/imap/test_imap_response_parser.rb =================================================================== --- ruby_2_0_0/test/net/imap/test_imap_response_parser.rb (revision 41187) +++ ruby_2_0_0/test/net/imap/test_imap_response_parser.rb (revision 41188) @@ -194,4 +194,15 @@ EOF https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/test/net/imap/test_imap_response_parser.rb#L194 response.data[0].user) assert_equal("lrswickxteda", response.data[0].rights) end + + # [Bug #8415] + def test_capability + parser = Net::IMAP::ResponseParser.new + response = parser.parse("* CAPABILITY st11p00mm-iscream009 1Q49 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN\r\n") + assert_equal("CAPABILITY", response.name) + assert_equal("AUTH=PLAIN", response.data.last) + response = parser.parse("* CAPABILITY st11p00mm-iscream009 1Q49 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN \r\n") + assert_equal("CAPABILITY", response.name) + assert_equal("AUTH=PLAIN", response.data.last) + end end Property changes on: ruby_2_0_0 ___________________________________________________________________ Modified: svn:mergeinfo Merged /trunk:r41091 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/