Skip to content

Commit 52cdd86

Browse files
committed
merge revision(s) 41091: [Backport ruby#8415]
* lib/net/imap.rb (capability_response): should ignore trailing spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug ruby#8415] * test/net/imap/test_imap_response_parser.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@41188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 6340583 commit 52cdd86

File tree

4 files changed

+20
-1
lines changed

4 files changed

+20
-1
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
Sun Jun 9 01:30:57 2013 Shugo Maeda <[email protected]>
2+
3+
* lib/net/imap.rb (capability_response): should ignore trailing
4+
spaces. Thanks, Peter Kovacs. [ruby-core:55024] [Bug #8415]
5+
6+
* test/net/imap/test_imap_response_parser.rb: related test.
7+
18
Wed Jun 5 00:38:46 2013 Nobuyoshi Nakada <[email protected]>
29

310
* ext/zlib/zlib.c (gzfile_read, gzfile_read_all, gzfile_getc),

lib/net/imap.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,6 +2954,7 @@ def capability_response
29542954
break
29552955
when T_SPACE
29562956
shift_token
2957+
next
29572958
end
29582959
data.push(atom.upcase)
29592960
end

test/net/imap/test_imap_response_parser.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,4 +194,15 @@ def test_acl
194194
response.data[0].user)
195195
assert_equal("lrswickxteda", response.data[0].rights)
196196
end
197+
198+
# [Bug #8415]
199+
def test_capability
200+
parser = Net::IMAP::ResponseParser.new
201+
response = parser.parse("* CAPABILITY st11p00mm-iscream009 1Q49 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN\r\n")
202+
assert_equal("CAPABILITY", response.name)
203+
assert_equal("AUTH=PLAIN", response.data.last)
204+
response = parser.parse("* CAPABILITY st11p00mm-iscream009 1Q49 XAPPLEPUSHSERVICE IMAP4 IMAP4rev1 SASL-IR AUTH=ATOKEN AUTH=PLAIN \r\n")
205+
assert_equal("CAPABILITY", response.name)
206+
assert_equal("AUTH=PLAIN", response.data.last)
207+
end
197208
end

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.0.0"
22
#define RUBY_RELEASE_DATE "2013-06-09"
3-
#define RUBY_PATCHLEVEL 209
3+
#define RUBY_PATCHLEVEL 210
44

55
#define RUBY_RELEASE_YEAR 2013
66
#define RUBY_RELEASE_MONTH 6

0 commit comments

Comments
 (0)