From 066b30245bea02bf217ea6b49fd2e906781e67c1 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 16 Aug 2009 06:31:31 +0000 Subject: [PATCH] rescue Encoding::ConverterNotFoundError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/csv/test_encodings.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/csv/test_encodings.rb b/test/csv/test_encodings.rb index 63f7207c29..5d29ac1fa9 100644 --- a/test/csv/test_encodings.rb +++ b/test/csv/test_encodings.rb @@ -197,8 +197,12 @@ class TestEncodings < Test::Unit::TestCase def test_can_write_csv_in_any_encoding each_encoding do |encoding| # test generate_line with encoding hint - csv = %w[abc d|ef].map { |f| f.encode(encoding) }. - to_csv(col_sep: "|", encoding: encoding.name) + begin + csv = %w[abc d|ef].map { |f| f.encode(encoding) }. + to_csv(col_sep: "|", encoding: encoding.name) + rescue Encoding::ConverterNotFoundError + next + end assert_equal(encoding, csv.encoding) # test generate_line with encoding guessing from fields