diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-23 00:14:48 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-12-23 00:14:48 +0000 |
| commit | 5fa0da6490460be463dda0351d988b4d107941ae (patch) | |
| tree | 0392c92493d1ee101f830404d3c3d8793f1a20ce /test/cgi/test_cgi_cookie.rb | |
| parent | 71a31e48480c578a92b6cd9985106674edf92009 (diff) | |
| download | ruby-5fa0da6490460be463dda0351d988b4d107941ae.tar.gz ruby-5fa0da6490460be463dda0351d988b4d107941ae.tar.xz ruby-5fa0da6490460be463dda0351d988b4d107941ae.zip | |
* test/cgi: check by Encoding.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@26154 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/cgi/test_cgi_cookie.rb')
| -rw-r--r-- | test/cgi/test_cgi_cookie.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/cgi/test_cgi_cookie.rb b/test/cgi/test_cgi_cookie.rb index c55b52ed0..c1c6a30e7 100644 --- a/test/cgi/test_cgi_cookie.rb +++ b/test/cgi/test_cgi_cookie.rb @@ -9,7 +9,7 @@ class CGICookieTest < Test::Unit::TestCase def setup ENV['REQUEST_METHOD'] = 'GET' @str1="\xE3\x82\x86\xE3\x82\x93\xE3\x82\x86\xE3\x82\x93" - @str1.force_encoding("UTF-8") if RUBY_VERSION>="1.9" + @str1.force_encoding("UTF-8") if defined?(::Encoding) end def teardown @@ -34,7 +34,7 @@ class CGICookieTest < Test::Unit::TestCase def test_cgi_cookie_new_complex t = Time.gm(2030, 12, 31, 23, 59, 59) value = ['val1', '&<>"', "\xA5\xE0\xA5\xB9\xA5\xAB"] - value[2].force_encoding("EUC-JP") if RUBY_VERSION>="1.9" + value[2].force_encoding("EUC-JP") if defined?(::Encoding) cookie = CGI::Cookie.new('name'=>'name1', 'value'=>value, 'path'=>'/cgi-bin/myapp/', |
