From 8e2e0c5ca3d87b96df5a55a1275dd8f2f22a6ce7 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 17 Dec 2007 01:28:26 +0000 Subject: for undefined conversions. * transcode_data_iso_8859.c: Changed from character constants ('\xC2') to integer contants (0xC2) for shorter files and better readability; eliminated duplicated tables; changed from -1 offset to actual UNDEF entry (not yet distinguishing UNDEF and ILLEGAL correctly). * test/ruby/test_transcode.rb: added a test for UNDEF conversion. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_transcode.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'test/ruby/test_transcode.rb') diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index a8bc712e9..071b97752 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -27,6 +27,7 @@ class TestTranscode < Test::Unit::TestCase assert_raise(ArgumentError) { 'abc'.encode!('foo', 'bar') } assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode('foo') } assert_raise(ArgumentError) { 'abc'.force_encoding('utf-8').encode!('foo') } + assert_raise(RuntimeError) { "\xA5".encode('utf-8','iso-8859-3') } end def test_arguments -- cgit