[前][次][番号順一覧][スレッド一覧]

ruby-changes:68149

From: John <ko1@a...>
Date: Tue, 28 Sep 2021 06:06:06 +0900 (JST)
Subject: [ruby-changes:68149] 1147136b8a (master): [ruby/timeout] test that yield is given number of seconds

https://git.ruby-lang.org/ruby.git/commit/?id=1147136b8a

From 1147136b8a2fd40b2c2a60c00aa47ad514dd934e Mon Sep 17 00:00:00 2001
From: John Bachir <j@j...>
Date: Fri, 24 Sep 2021 23:15:52 +0100
Subject: [ruby/timeout] test that yield is given number of seconds

https://github.com/ruby/timeout/commit/ec5a614334
---
 test/test_timeout.rb | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/test_timeout.rb b/test/test_timeout.rb
index 1caea18..74b65f1 100644
--- a/test/test_timeout.rb
+++ b/test/test_timeout.rb
@@ -10,6 +10,10 @@ class TestTimeout < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/test_timeout.rb#L10
     end
   end
 
+  def test_yield_param
+    assert_equal [5, :ok], Timeout.timeout(5){|s| [s, :ok] }
+  end
+
   def test_queue
     q = Thread::Queue.new
     assert_raise(Timeout::Error, "[ruby-dev:32935]") {
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]