diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-15 16:27:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-09-15 16:27:06 +0000 |
commit | e04046515389ba4d019a13db33de198b85480b00 (patch) | |
tree | 72755daee21bb55c936c54a2c6cfac76da4f8098 /test/ruby | |
parent | 97f8d0fb9e620e5219320803a6da65a544e115ec (diff) | |
download | ruby-e04046515389ba4d019a13db33de198b85480b00.tar.gz |
encoding.c: check external encoding
* encoding.c (rb_enc_get_index): external encoding may not be Data
object. [ruby-core:89016] [Bug #15122]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 27077b425b..eeda96c9ef 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3855,4 +3855,11 @@ __END__ th.join end; end + + def test_external_encoding_index + IO.pipe {|r, w| + assert_raise(TypeError) {Marshal.dump(r)} + assert_raise(TypeError) {Marshal.dump(w)} + } + end end |