зеркало из https://github.com/github/ruby.git
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:
Родитель
9ba849e631
Коммит
c79307c0dc
|
@ -379,12 +379,12 @@ class TestFiber < Test::Unit::TestCase
|
|||
assert_match(/resumed/, Fiber.current.to_s)
|
||||
end
|
||||
|
||||
def assert_create_fiber_in_new_thread
|
||||
def test_create_fiber_in_new_thread
|
||||
ret = Thread.new{
|
||||
Thread.new{
|
||||
Fiber.new{Fiber.yield :ok}.resume
|
||||
}.join
|
||||
}.join
|
||||
}.value
|
||||
}.value
|
||||
assert_equal :ok, ret, '[Bug #14642]'
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче