diff --git a/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb b/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb index 4db7c7f0c..c496afee6 100644 --- a/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb +++ b/lib/concurrent-ruby/concurrent/executor/serialized_execution.rb @@ -32,6 +32,8 @@ def call # # @raise [ArgumentError] if no task is given def post(executor, *args, &task) + raise ArgumentError.new('no block given') unless block_given? + posts [[executor, args, task]] true end