From 831eb93069492c82fa997287c77ca8d9f2ad8668 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Mar 2010 21:37:16 +0000 Subject: * sample/timeout.rb: split from lib/timeout.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/timeout.rb | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lib/timeout.rb') diff --git a/lib/timeout.rb b/lib/timeout.rb index 893b5f8f58..1dccc57477 100644 --- a/lib/timeout.rb +++ b/lib/timeout.rb @@ -85,24 +85,3 @@ end # Another name for Timeout::Error, defined for backwards compatibility with # earlier versions of timeout.rb. TimeoutError = Timeout::Error - -if __FILE__ == $0 - p timeout(5) { - 45 - } - p timeout(5, TimeoutError) { - 45 - } - p timeout(nil) { - 54 - } - p timeout(0) { - 54 - } - p timeout(5) { - loop { - p 10 - sleep 1 - } - } -end -- cgit v1.2.3