mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_fiber.rb: fix test_create_fiber_in_new_thread
* test/ruby/test_fiber.rb (test_create_fiber_in_new_thread): prefix to run, and get the result value not only waiting. [Bug #14642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9ba849e631
commit
c79307c0dc
1 changed files with 3 additions and 3 deletions
|
@ -379,12 +379,12 @@ class TestFiber < Test::Unit::TestCase
|
||||||
assert_match(/resumed/, Fiber.current.to_s)
|
assert_match(/resumed/, Fiber.current.to_s)
|
||||||
end
|
end
|
||||||
|
|
||||||
def assert_create_fiber_in_new_thread
|
def test_create_fiber_in_new_thread
|
||||||
ret = Thread.new{
|
ret = Thread.new{
|
||||||
Thread.new{
|
Thread.new{
|
||||||
Fiber.new{Fiber.yield :ok}.resume
|
Fiber.new{Fiber.yield :ok}.resume
|
||||||
}.join
|
}.value
|
||||||
}.join
|
}.value
|
||||||
assert_equal :ok, ret, '[Bug #14642]'
|
assert_equal :ok, ret, '[Bug #14642]'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue