summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_continuation.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ruby/test_continuation.rb b/test/ruby/test_continuation.rb
index f8302abdc1..c719db8c35 100644
--- a/test/ruby/test_continuation.rb
+++ b/test/ruby/test_continuation.rb
@@ -63,5 +63,19 @@ class TestContinuation < Test::Unit::TestCase
$k.call if n < 100
}, '[ruby-dev:34798]'
end
+
+ def test_marshal_dump
+ assert_normal_exit %q{
+ require 'continuation'
+ n = 0
+ o = Object.new
+ def o.marshal_dump() callcc {|k| $k = k }; "fofof" end
+ a = [1,2,3,o,4,5,6]
+ Marshal.dump(a).inspect
+ n += 1
+ $k.call if n < 100
+ }, '[ruby-dev:34802]'
+ end
+
end