diff options
author | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-07 03:48:13 +0000 |
---|---|---|
committer | ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-06-07 03:48:13 +0000 |
commit | ebdd83920b6b97103c93325dbdae13aa32018f78 (patch) | |
tree | 3d81704bfc7da4924e439606c392d64180fb74a5 /test | |
parent | 327060e0d340159222d74ca79b0e0acfdd571b91 (diff) | |
download | ruby-ebdd83920b6b97103c93325dbdae13aa32018f78.tar.gz ruby-ebdd83920b6b97103c93325dbdae13aa32018f78.tar.xz ruby-ebdd83920b6b97103c93325dbdae13aa32018f78.zip |
* cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911].
* test/ruby/test_fiber.rb: add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_fiber.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb index c99e302b1..6c67a5815 100644 --- a/test/ruby/test_fiber.rb +++ b/test/ruby/test_fiber.rb @@ -116,7 +116,15 @@ class TestFiber < Test::Unit::TestCase f2 = Fiber.new do c.call end - assert_equal(f1.yield, :ok) + assert_equal(:ok, f1.yield) + + assert_equal(:ok, + callcc {|c| + Fiber.new { + c.call :ok + }.yield + } + ) end end |