From db440bc6f04e7e4e4c2986a5ef17b698735e7899 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 22 May 2008 02:40:50 +0000 Subject: * test/ruby/envutil.rb (assert_normal_exit): capture stdout and stderr of the child process. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@16520 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_continuation.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test/ruby/test_continuation.rb') diff --git a/test/ruby/test_continuation.rb b/test/ruby/test_continuation.rb index 09787c158..f8302abdc 100644 --- a/test/ruby/test_continuation.rb +++ b/test/ruby/test_continuation.rb @@ -51,5 +51,17 @@ class TestContinuation < Test::Unit::TestCase c.call } end + + def test_ary_flatten + assert_normal_exit %q{ + require 'continuation' + n = 0 + o = Object.new + def o.to_ary() callcc {|k| $k = k; [1,2,3]} end + [10,20,o,30,o,40].flatten.inspect + n += 1 + $k.call if n < 100 + }, '[ruby-dev:34798]' + end end -- cgit