ruby-changes:50874
From: nobu <ko1@a...>
Date: Wed, 4 Apr 2018 01:54:32 +0900 (JST)
Subject: [ruby-changes:50874] nobu:r63081 (trunk): test_fiber.rb: fix test_create_fiber_in_new_thread
nobu 2018-04-04 01:54:27 +0900 (Wed, 04 Apr 2018) New Revision: 63081 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63081 Log: 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] Modified files: trunk/test/ruby/test_fiber.rb Index: test/ruby/test_fiber.rb =================================================================== --- test/ruby/test_fiber.rb (revision 63080) +++ test/ruby/test_fiber.rb (revision 63081) @@ -379,12 +379,12 @@ class TestFiber < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_fiber.rb#L379 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/