Skip to content

Commit cc80dc7

Browse files
committed
Fixed bug introduced while cutting/pasting YARD documentation.
1 parent d85eeee commit cc80dc7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/concurrent/java_cached_thread_pool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def wait_for_termination(timeout)
5959
#
6060
# @raise [ArgumentError] if no task is given
6161
def post(*args)
62-
raise ArgumentError.new('no block given') unless task_given?
62+
raise ArgumentError.new('no block given') unless block_given?
6363
@executor.submit{ yield(*args) }
6464
return true
6565
rescue Java::JavaUtilConcurrent::RejectedExecutionException => ex

lib/concurrent/ruby_cached_thread_pool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def wait_for_termination(timeout)
8383
#
8484
# @raise [ArgumentError] if no block is given
8585
def post(*args, &task)
86-
raise ArgumentError.new('no block given') if task.nil?
86+
raise ArgumentError.new('no block given') unless block_given?
8787
@mutex.synchronize do
8888
break false unless @state == :running
8989

0 commit comments

Comments
 (0)