diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-21 07:38:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-11-21 07:38:51 +0000 |
commit | 75090a663baed0c88d905ed1f45feefc301c2e55 (patch) | |
tree | 3986060a5be7b399d4fc1a834263f1c27c5c8187 /test | |
parent | 8f05568afb57e733196408a500cfd9c48fb88fac (diff) | |
download | ruby-75090a663baed0c88d905ed1f45feefc301c2e55.tar.gz |
* marshal.c (marshal_dump): use normal object as the buffer so
that no hidden object is exposed to ruby-level. [ruby-dev:39744]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_marshal.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb index df02086da8..0b37b7ab17 100644 --- a/test/ruby/test_marshal.rb +++ b/test/ruby/test_marshal.rb @@ -300,4 +300,14 @@ class TestMarshal < Test::Unit::TestCase assert(true, '[ruby-dev:39425]') assert_raise(StopIteration) {e.next} end + + def test_dump_buffer + bug2390 = '[ruby-dev:39744]' + w = "" + def w.write(str) + self << str.to_s + end + Marshal.dump(Object.new, w) + assert_not_empty(w, bug2390) + end end |