summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-11 21:37:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-03-11 21:37:16 +0000
commit831eb93069492c82fa997287c77ca8d9f2ad8668 (patch)
treebc0a3451b86bac8f215721f9ba96acca75e6b1bd /lib
parentebfe278914d74595a02e0bbd9bbcfb265967dcc3 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/timeout.rb21
1 files changed, 0 insertions, 21 deletions
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