mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
b60d64b001
commit
8620de6b04
3 changed files with 21 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue