summaryrefslogtreecommitdiff
path: root/test/cgi/test_cgi_session.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_session.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_session.rb')
-rw-r--r--test/cgi/test_cgi_session.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/cgi/test_cgi_session.rb b/test/cgi/test_cgi_session.rb
index 50e0f4af4d0..f3b8e60865e 100644
--- a/test/cgi/test_cgi_session.rb
+++ b/test/cgi/test_cgi_session.rb
@@ -27,7 +27,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir)
@@ -65,7 +65,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"database_manager"=>CGI::Session::PStore)
@@ -102,7 +102,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_id"=>"foo")
@@ -142,7 +142,7 @@ class CGISessionTest < Test::Unit::TestCase
}
value1="value1"
value2="\x8F\xBC\x8D]"
- value2.force_encoding("SJIS") if RUBY_VERSION>="1.9"
+ value2.force_encoding("SJIS") if defined?(::Encoding)
ENV.update(@environ)
cgi = CGI.new
session = CGI::Session.new(cgi,"tmpdir"=>@session_dir,"session_key"=>"bar")