From 3811bb53bdc604ec6abe1252787c3fb381a711d6 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 28 Aug 2008 17:13:49 +0000 Subject: * transcode.c (econv_primitive_convert): accept nil as input for empty input. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_econv.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 5324e6dfe2..bc22da567d 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -79,6 +79,12 @@ class TestEncodingConverter < Test::Unit::TestCase } end + def test_nil_input + ec = Encoding::Converter.new("UTF-8", "EUC-JP") + ret = ec.primitive_convert(nil, dst="", nil, 10) + assert_equal(:finished, ret) + end + def test_partial_input ec = Encoding::Converter.new("UTF-8", "EUC-JP") ret = ec.primitive_convert(src="", dst="", nil, 10, Encoding::Converter::PARTIAL_INPUT) -- cgit v1.2.3