Project

General

Profile

Bug #15362 ยป 0001-Add-a-test-for-Bug-14561.patch

alanwu (Alan Wu), 11/30/2018 08:22 PM

View differences:

test/ruby/test_fiber.rb
398 398
    }.value
399 399
    assert_equal :ok, ret, '[Bug #14642]'
400 400
  end
401

  
402
  def test_machine_stack_gc
403
    assert_normal_exit <<-RUBY, '[Bug #14561]', timeout: 10
404
      enum = Enumerator.new { |y| y << 1 }
405
      thread = Thread.new { enum.peek }
406
      thread.join
407
      sleep 5     # pause until thread cache wait time runs out. Native thread exits.
408
      GC.start
409
    RUBY
410
  end
401 411
end
402
-