Project

General

Profile

Actions

Bug #3168

closed

TypeError in Timeout.timeout

Added by znz (Kazuhiro NISHIYAMA) over 14 years ago. Updated over 13 years ago.

Status:
Closed
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2010-04-19 trunk 27394) [x86_64-linux]
Backport:
[ruby-dev:41010]

Description

=begin
http://d.hatena.ne.jp/moro/20100416/1271410920 で知ったのですが、timeout待ち用のスレッドが sleep の例外を無視してるのはまずいのではないでしょうか?

diff --git a/test/test_timeout.rb b/test/test_timeout.rb
index 9ec9c02..472e7ad 100644
--- a/test/test_timeout.rb
+++ b/test/test_timeout.rb
@@ -23,4 +23,12 @@ class TestTimeout < Test::Unit::TestCase
end
assert @flag, "[ruby-dev:38319]"
end
+

  • def test_cannot_convert_into_time_interval
  • aoe = Thread.abort_on_exception
  • Thread.abort_on_exception = true
  • Timeout.timeout(1.i) { sleep 0.1 }
  • ensure
  • Thread.abort_on_exception = aoe
  • end
    end
    =end

Related issues 1 (0 open1 closed)

Related to Backport187 - Backport #3170: timeout() does'nt work with Non Integer/Float ArgumentClosed04/19/2010Actions
Actions #1

Updated by nobu (Nobuyoshi Nakada) over 14 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27395.
Kazuhiro, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Actions

Also available in: Atom PDF

Like0
Like0