summaryrefslogtreecommitdiff
path: root/test/ruby/test_fiber.rb
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 03:48:13 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-06-07 03:48:13 +0000
commit8620de6b042f2c069a25d7fdbf5b1d5a3ffd87a9 (patch)
tree3d81704bfc7da4924e439606c392d64180fb74a5 /test/ruby/test_fiber.rb
parentb60d64b001c8819e6626b00efbeae96560368a08 (diff)
* cont.c (cont_restore_1): fix to check root fiber [ruby-dev:30911].
* test/ruby/test_fiber.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_fiber.rb')
-rw-r--r--test/ruby/test_fiber.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/ruby/test_fiber.rb b/test/ruby/test_fiber.rb
index c99e302b19..6c67a5815d 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