diff --git a/ChangeLog b/ChangeLog index f8f109b083..5afcec1cca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Fri Aug 9 15:56:05 2013 NAKAMURA Usaku + + * lib/net/http.rb (Net::HTTP#send_request_with_body_stream): use + String#bytesize instead of String#length. + reported by shekhei (shek hei wong) at [ruby-core:53775] + [Backport #8176]. + Fri Aug 9 15:50:11 2013 NAKAMURA Usaku * win32/win32.c (wrename): use MoveFileExW instead of MoveFileW, diff --git a/lib/net/http.rb b/lib/net/http.rb index 9e4fe6a120..67de15cd27 100644 --- a/lib/net/http.rb +++ b/lib/net/http.rb @@ -1948,7 +1948,7 @@ module Net #:nodoc: wait_for_continue sock, ver if sock.continue_timeout if chunked? while s = f.read(1024) - sock.write(sprintf("%x\r\n", s.length) << s << "\r\n") + sock.write(sprintf("%x\r\n", s.bytesize) << s << "\r\n") end sock.write "0\r\n\r\n" else diff --git a/version.h b/version.h index a735292053..5053facb33 100644 --- a/version.h +++ b/version.h @@ -1,5 +1,5 @@ #define RUBY_VERSION "1.9.3" -#define RUBY_PATCHLEVEL 461 +#define RUBY_PATCHLEVEL 462 #define RUBY_RELEASE_DATE "2013-08-09" #define RUBY_RELEASE_YEAR 2013