summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_multipart.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:40:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-14 06:40:55 +0000
commitc81b224edca453ed8ea3030cc74b2ede5ac9e63a (patch)
tree91fad68f293185c4ac2ee01e568b91896ae04bb9 /test/cgi/test_cgi_multipart.rb
parentfcb4ab8d1c917b3f2a998f9b6eab3d9cec27670a (diff)
test: use String#b instead of dup.force_encoding
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53109 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_multipart.rb')
-rw-r--r--test/cgi/test_cgi_multipart.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb
index 989c054f8a..b3df694849 100644
--- a/test/cgi/test_cgi_multipart.rb
+++ b/test/cgi/test_cgi_multipart.rb
@@ -45,8 +45,7 @@ class MultiPart
buf << "Content-Disposition: form-data: name=\"#{name}\"#{s}\r\n"
buf << "Content-Type: #{content_type}\r\n" if content_type
buf << "\r\n"
- value = value.dup.force_encoding(::Encoding::ASCII_8BIT) if defined?(::Encoding)
- buf << value
+ buf << value.b
buf << "\r\n"
return self
end