summaryrefslogtreecommitdiff
path: root/lib/thwait.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thwait.rb')
-rw-r--r--lib/thwait.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/thwait.rb b/lib/thwait.rb
index 958163edef..45d6a89713 100644
--- a/lib/thwait.rb
+++ b/lib/thwait.rb
@@ -48,7 +48,7 @@ class ThreadsWait
def ThreadsWait.all_waits(*threads)
tw = ThreadsWait.new(*threads)
- if iterator?
+ if block_given?
tw.all_waits do
|th|
yield th
@@ -125,7 +125,7 @@ class ThreadsWait
def all_waits
until @threads.empty?
th = next_wait
- yield th if iterator?
+ yield th if block_given?
end
end
end