summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-04 12:51:32 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-04 12:51:32 +0000
commit8f591c434d5de0a5cfdef9d88c929087a1f32ce1 (patch)
tree57235875a6b5f31ecc6d179031fff3ac7b290426 /test/ruby
parent6e063278176cc624a22c7db612d702ac92d61384 (diff)
* marshal.c (marshal_load): should set taintness. [ruby-dev:39723]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@25995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_marshal.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index 046c258b85..d40c9da4d4 100644
--- a/test/ruby/test_marshal.rb
+++ b/test/ruby/test_marshal.rb
@@ -99,4 +99,13 @@ class TestMarshal < Test::Unit::TestCase
GC.start
assert(true, '[ruby-dev:39425]')
end
+
+ def test_taint
+ x = Object.new
+ x.taint
+ s = Marshal.dump(x)
+ assert_equal(true, s.tainted?)
+ y = Marshal.load(s)
+ assert_equal(true, y.tainted?)
+ end
end