From 75090a663baed0c88d905ed1f45feefc301c2e55 Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 21 Nov 2009 07:38:51 +0000 Subject: * 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 --- test/ruby/test_marshal.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 -- cgit v1.2.3