summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-07 21:18:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-07 21:18:33 +0000
commitb4135fcbc612bb4bfb924ad60fd6fcf781a33500 (patch)
tree4b96e35a43da3dde0e113e82b2e043cac6b57e58 /test
parenta2fffe685729f00009bdc57a1fd42382cb387558 (diff)
downloadruby-b4135fcbc612bb4bfb924ad60fd6fcf781a33500.tar.gz
ruby-b4135fcbc612bb4bfb924ad60fd6fcf781a33500.tar.xz
ruby-b4135fcbc612bb4bfb924ad60fd6fcf781a33500.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@24443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 268acf2a3..4a9192d44 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