From 587e92cdf98a7e1af4b0a5317e52e523b1e7800a Mon Sep 17 00:00:00 2001 From: xibbar Date: Thu, 2 Oct 2008 12:37:30 +0000 Subject: * lib/cgi/core.rb (CGI::QueryExtension): delete MorphingBody and replace like as 1.8's in multipart reading. see [ruby-dev:36443], reference from CGIAlt http://cgialt.rubyforge.org/ * test/cgi/test_cgi_multipart.rb : fixed multipart test. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/cgi/test_cgi_multipart.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/cgi') diff --git a/test/cgi/test_cgi_multipart.rb b/test/cgi/test_cgi_multipart.rb index 18eb741d7..794021a9b 100755 --- a/test/cgi/test_cgi_multipart.rb +++ b/test/cgi/test_cgi_multipart.rb @@ -150,9 +150,9 @@ class CGIMultipartTest < Test::Unit::TestCase name = hash[:name] expected = hash[:value] expected_class = @expected_class || (hash[:value].length < threshold ? StringIO : Tempfile) - assert_kind_of(expected_class, cgi[name]) if RUBY_VERSION<"1.9" - assert_equal(expected, cgi[name].read()) if RUBY_VERSION<"1.9" - assert_equal(hash[:filename] || '', cgi[name].original_filename) #if hash[:filename] + assert_kind_of(expected_class, cgi[name]) + assert_equal(expected, cgi[name].read()) + assert_equal(hash[:filename] || '', cgi[name].original_filename) #if hash[:filename] assert_equal(hash[:content_type] || '', cgi[name].content_type) #if hash[:content_type] end end @@ -192,7 +192,7 @@ class CGIMultipartTest < Test::Unit::TestCase ] @expected_class = Tempfile _test_multipart() - end + end if RUBY_VERSION < "1.9" def _set_const(klass, name, value) -- cgit