summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-21 07:38:51 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-21 07:38:51 +0000
commit72b284797a3b2565aeea1efe0e6c0be07df4fbae (patch)
tree3986060a5be7b399d4fc1a834263f1c27c5c8187 /test
parent99cb8dc38a8624cb248dfc0afcd33ba896080324 (diff)
downloadruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.tar.gz
ruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.tar.xz
ruby-72b284797a3b2565aeea1efe0e6c0be07df4fbae.zip
* 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: http://svn.ruby-lang.org/repos/ruby/trunk@25881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_marshal.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_marshal.rb b/test/ruby/test_marshal.rb
index df02086da..0b37b7ab1 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