mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Enable unless cops
We discussed the use of `unless` internally and decided to enforce available rules from rubocop to restrict its most problematic uses.
This commit is contained in:
committed by
Loïc Guitaut
parent
87de3c2319
commit
f7c57fbc19
@@ -21,7 +21,7 @@ module Concurrency
|
||||
def choose(*options)
|
||||
raise DeadEnd if options.empty?
|
||||
|
||||
@path << [options.size, 0] unless @index < @path.size
|
||||
@path << [options.size, 0] if @index >= @path.size
|
||||
|
||||
pair = @path[@index]
|
||||
raise "non-determinism" unless pair[0] == options.size
|
||||
|
||||
Reference in New Issue
Block a user