Skip to content

Commit f11b6ec

Browse files
fzakariapitr-ch
andauthored
make if condition more ruby-idiomatic
Co-Authored-By: Chalupa Petr <[email protected]>
1 parent 578285b commit f11b6ec

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/concurrent-ruby/concurrent/executor/ruby_thread_pool_executor.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@ def ns_assign_worker(*args, &task)
209209
#
210210
# @!visibility private
211211
def ns_enqueue(*args, &task)
212-
if @synchronous
213-
return false
214-
end
212+
return false if @synchronous
215213

216214
if !ns_limited_queue? || @queue.size < @max_queue
217215
@queue << [task, args]

0 commit comments

Comments
 (0)