[Bug #3168] TypeError in Timeout.timeout

Bug #3168: TypeError in Timeout.timeout
http://redmine.ruby-lang.org/issues/show/3168

e$B5/I<<Te(B: Kazuhiro NISHIYAMA
e$B%9%F!<%?%9e(B: Open, e$BM%@hEYe(B: Normal
e$B%+%F%4%je(B: lib, Target version: 1.9.2
ruby -v: ruby 1.9.2dev (2010-04-19 trunk 27394) [x86_64-linux]

http://d.hatena.ne.jp/moro/20100416/1271410920
e$B$GCN$C$?$N$G$9$,!"e(Btimeoute$BBT$AMQ$N%9%l%C%I$,e(B sleep
e$B$NNc30$rL5;k$7$F$k$N$O$^$:$$$N$G$O$J$$$G$7$g$&$+e(B?

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

e$B%A%1%C%He(B #3168 e$B$,99?7$5$l$^$7$?!#e(B (by Nobuyoshi N.)

e$B%9%F!<%?%9e(B Opene$B$+$ie(BClosede$B$KJQ99e(B
e$B?JD=e(B % 0e$B$+$ie(B100e$B$KJQ99e(B

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.


http://redmine.ruby-lang.org/issues/show/3168