diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-07 21:18:33 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-08-07 21:18:33 +0000 |
commit | ac2557e09fab847d48718222d351c16fff9432d0 (patch) | |
tree | 4b96e35a43da3dde0e113e82b2e043cac6b57e58 /test | |
parent | 5414f008d79a8721dc92b449f613f7e9d7bed806 (diff) | |
download | ruby-ac2557e09fab847d48718222d351c16fff9432d0.tar.gz |
* marshal.c (w_symbol r_symlink, r_symbol, r_object0): fix for
non-ascii symbols. loading such symbols can cause segfaults in
older versions. [ruby-core:24788]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_marshal.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index 268acf2a32..4a9192d448 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -192,4 +192,10 @@ class TestMarshal < Test::Unit::TestCase assert_equal(true, y.tainted?) assert_equal(true, y.untrusted?) end + + def test_symbol + [:ruby, :"\u{7d05}\u{7389}"].each do |sym| + assert_equal(sym, Marshal.load(Marshal.dump(sym)), '[ruby-core:24788]') + end + end end |