diff options
| author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 09:40:06 +0000 |
|---|---|---|
| committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-30 09:40:06 +0000 |
| commit | 458c447fdfbacfc5f8b3da40f103ca2bf8eb6ca2 (patch) | |
| tree | f6397cd73df1fea3bc3a0328ec5e568110691dc4 /test/ruby/test_transcode.rb | |
| parent | 1ef67e7146a4a11259900c16746d3c8db9637e52 (diff) | |
| download | ruby-458c447fdfbacfc5f8b3da40f103ca2bf8eb6ca2.tar.gz ruby-458c447fdfbacfc5f8b3da40f103ca2bf8eb6ca2.tar.xz ruby-458c447fdfbacfc5f8b3da40f103ca2bf8eb6ca2.zip | |
* transcode.c: added check for frozen string for encode! (see Bug #1836)
* test/ruby/test_transcode.rb: added tests for the above
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_transcode.rb')
| -rw-r--r-- | test/ruby/test_transcode.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/ruby/test_transcode.rb b/test/ruby/test_transcode.rb index 41e032fdb..cd956e134 100644 --- a/test/ruby/test_transcode.rb +++ b/test/ruby/test_transcode.rb @@ -11,6 +11,8 @@ class TestTranscode < Test::Unit::TestCase assert_raise(Encoding::UndefinedConversionError) { "\x80".encode('utf-8','ASCII-8BIT') } assert_raise(Encoding::InvalidByteSequenceError) { "\x80".encode('utf-8','US-ASCII') } assert_raise(Encoding::UndefinedConversionError) { "\xA5".encode('utf-8','iso-8859-3') } + assert_raise(RuntimeError) { 'hello'.freeze.encode!('iso-8859-1') } + assert_raise(RuntimeError) { '\u3053\u3093\u306b\u3061\u306f'.freeze.encode!('iso-8859-1') } # こんにちは end def test_arguments |
