aboutsummaryrefslogtreecommitdiffstats
path: root/test/net/http/test_http.rb
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 18:02:24 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 18:02:24 +0000
commit7edda76f1597a92a3d07ab8b1f3ba7f1dee8798c (patch)
tree85553c61ed2beedf22765e3ad5b6848b4b4b227f /test/net/http/test_http.rb
parent04d83114a616daa8e1586f8d2cc71b209beac3d4 (diff)
downloadruby-7edda76f1597a92a3d07ab8b1f3ba7f1dee8798c.tar.gz
* test/net/http/test_http.rb (_test_request__file): specify encoding
explicitly. * test/net/http/utils.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17725 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/net/http/test_http.rb')
-rw-r--r--test/net/http/test_http.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index 8b23edf61c..50d1fe2eae 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -191,9 +191,9 @@ module TestNetHTTP_version_1_2_methods
assert_kind_of Net::HTTPResponse, res
assert_not_nil res['content-length']
assert_equal $test_net_http_data.size, res['content-length'].to_i
- f = StringIO.new
+ f = StringIO.new("".force_encoding("ASCII-8BIT"))
res.read_body f
- assert_equal $test_net_http_data.size, f.string.size
+ assert_equal $test_net_http_data.bytesize, f.string.bytesize
assert_equal $test_net_http_data.encoding, f.string.encoding
assert_equal $test_net_http_data, f.string
}