diff options
Diffstat (limited to 'test/cgi/test_cgi_core.rb')
-rw-r--r-- | test/cgi/test_cgi_core.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cgi/test_cgi_core.rb b/test/cgi/test_cgi_core.rb index 3f75b04fd4..23b8891576 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 |