ruby-changes:12825
From: naruse <ko1@a...>
Date: Sun, 16 Aug 2009 15:31:48 +0900 (JST)
Subject: [ruby-changes:12825] Ruby:r24554 (trunk): rescue Encoding::ConverterNotFoundError.
naruse 2009-08-16 15:31:31 +0900 (Sun, 16 Aug 2009) New Revision: 24554 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=24554 Log: rescue Encoding::ConverterNotFoundError. Modified files: trunk/test/csv/test_encodings.rb Index: test/csv/test_encodings.rb =================================================================== --- test/csv/test_encodings.rb (revision 24553) +++ test/csv/test_encodings.rb (revision 24554) @@ -197,8 +197,12 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/