From: Kazuhiro NISHIYAMA Date: 2000-10-14T05:32:17+09:00 Subject: [ruby-dev:11213] Thread.kill or Thread#kill On Sat, 14 Oct 2000 05:17:32 +0900 Kazuhiro NISHIYAMA wrote: > Exception `NameError' at /tmp/kazu/lib/ruby/1.6/timeout.rb:42 これって修正しても関係なかったのですが、ruby 1.6としては どっちの方がおすすめなんでしょうか? --- timeout.rb~ Tue May 30 13:24:12 2000 +++ timeout.rb Sat Oct 14 05:24:42 2000 @@ -39,6 +39,6 @@ yield sec return true ensure - Thread.kill y if y.alive? + y.kill if y.alive? end end --- monitor.rb~ Fri Aug 13 14:45:16 1999 +++ monitor.rb Sat Oct 14 05:24:32 2000 @@ -77,7 +77,7 @@ @waiters.delete(Thread.current) ensure if timeout && timeout_thread.alive? - Thread.kill(timeout_thread) + timeout_thread.kill end end --- ZnZ(ゼット エヌ ゼット) 西山和広(Kazuhiro NISHIYAMA) mailto:zn@mbf.nifty.com