diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-16 11:43:37 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-04-16 11:43:37 +0000 |
commit | 2c1c5570e83ab6cc7f832cf0249e0c44cb2689e0 (patch) | |
tree | 159ccb46c73c2c7378768f41fc18a224a444d746 /test/ruby/test_marshal.rb | |
parent | c5e9beac25c3cf4e5ff317468db043455c504a73 (diff) |
marshal.c: class name encoding
* marshal.c (w_object): preserve the encoding of the class name in
an error message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_marshal.rb')
-rw-r--r-- | test/ruby/test_marshal.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 3d5d6c9b1f..c8d79edb02 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -647,4 +647,11 @@ class TestMarshal < Test::Unit::TestCase c.cc.call end end + + def test_undumpable_message + c = Module.new {break module_eval("class IO\u{26a1} < IO;self;end")} + assert_raise_with_message(TypeError, /IO\u{26a1}/) { + Marshal.dump(c.new(0, autoclose: false)) + } + end end |