merges r30543 from trunk into ruby_1_9_2.

--
* lib/net/imap.rb: use bytesize for binary strings.
  patched by Yoshimasa Niwa. [ruby-core:34222]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_2@30576 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2011-01-16 12:35:36 +00:00
parent c303d3838b
commit 8de1ee21e4
3 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
Fri Jan 14 14:56:57 2011 NARUSE, Yui <naruse@ruby-lang.org>
* lib/net/imap.rb: use bytesize for binary strings.
patched by Yoshimasa Niwa. [ruby-core:34222]
Fri Jan 14 13:38:58 2011 NARUSE, Yui <naruse@ruby-lang.org> Fri Jan 14 13:38:58 2011 NARUSE, Yui <naruse@ruby-lang.org>
* ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in * ext/zlib/zlib.c (gzfile_check_footer): ISIZE (Input SIZE) in

View file

@ -1237,7 +1237,7 @@ module Net
end end
def send_literal(str) def send_literal(str)
put_string("{" + str.length.to_s + "}" + CRLF) put_string("{" + str.bytesize.to_s + "}" + CRLF)
@continuation_request_arrival.wait @continuation_request_arrival.wait
raise @exception if @exception raise @exception if @exception
put_string(str) put_string(str)
@ -2571,7 +2571,7 @@ module Net
return '""' return '""'
when /[\x80-\xff\r\n]/n when /[\x80-\xff\r\n]/n
# literal # literal
return "{" + str.length.to_s + "}" + CRLF + str return "{" + str.bytesize.to_s + "}" + CRLF + str
when /[(){ \x00-\x1f\x7f%*"\\]/n when /[(){ \x00-\x1f\x7f%*"\\]/n
# quoted string # quoted string
return '"' + str.gsub(/["\\]/n, "\\\\\\&") + '"' return '"' + str.gsub(/["\\]/n, "\\\\\\&") + '"'

View file

@ -1,5 +1,5 @@
#define RUBY_VERSION "1.9.2" #define RUBY_VERSION "1.9.2"
#define RUBY_PATCHLEVEL 156 #define RUBY_PATCHLEVEL 157
#define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_MINOR 9
#define RUBY_VERSION_TEENY 1 #define RUBY_VERSION_TEENY 1