summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_core.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-23 00:14:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-23 00:14:48 +0000
commit738515d12b8a0544bb6de9809b3edc9e2d9277f8 (patch)
tree0392c92493d1ee101f830404d3c3d8793f1a20ce /test/cgi/test_cgi_core.rb
parentda861d79b701ed24aa3a4e2f303fd00096359341 (diff)
* test/cgi: check by Encoding.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_core.rb')
-rw-r--r--test/cgi/test_cgi_core.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cgi/test_cgi_core.rb b/test/cgi/test_cgi_core.rb
index 3f75b04fd40..23b88915762 100644
--- a/test/cgi/test_cgi_core.rb
+++ b/test/cgi/test_cgi_core.rb
@@ -124,7 +124,7 @@ class CGICoreTest < Test::Unit::TestCase
$stdin = StringIO.new
$stdin << query_str
$stdin.rewind
- if RUBY_VERSION>="1.9.0"
+ if defined?(::Encoding)
hash={}
cgi = CGI.new(:accept_charset=>"UTF-8"){|key,val|hash[key]=val}
## cgi[]
@@ -251,7 +251,7 @@ class CGICoreTest < Test::Unit::TestCase
"Content-Length: 22\r\n" +
"\r\n" +
euc_str
- if RUBY_VERSION>="1.9"
+ if defined?(::Encoding)
actual.force_encoding("ASCII-8BIT")
expected.force_encoding("ASCII-8BIT")
end