diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-25 14:45:39 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-10-25 14:45:39 +0000 |
commit | 3354c14cd4515f87bbc4f4ba5cb9a4e2c361d678 (patch) | |
tree | 820599a3835d4f81f3a948ef9bc0aebaecbbb9b9 /test | |
parent | d2bb312a403e8327823bb800cc5382ebaa493cc6 (diff) |
merges r24443 from trunk into ruby_1_9_1.
--
* 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/branches/ruby_1_9_1@25473 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 |