Le 13 ao?t ? 15:48, Rik Hemsley a ?crit :

> The interpreter stops with the following:
> 
> /usr/lib/ruby/1.8/timeout.rb:54: execution expired (Timeout::Error)
>         from /usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
>         from test.rb:21

Why don't you simply rescue Timeout::Error ?

Timeout::timeout(1) do
  begin
    sleep(5)
  rescue Timeout::Error
    puts "rescued"
  end
end

Fred
-- 
You make this all go away (2x)  I'm down to just one thing  I'm starting
to scare myself   You make this all go away (2x)   I just want something
I just want something I can never have
                           (Nine Inch Nails, Something I Can Never Have)