diff --git a/spec/components/distributed_mutex_spec.rb b/spec/components/distributed_mutex_spec.rb index ddce89abe66..e04727a8a85 100644 --- a/spec/components/distributed_mutex_spec.rb +++ b/spec/components/distributed_mutex_spec.rb @@ -100,7 +100,7 @@ describe DistributedMutex do context "executions" do it "should not allow critical sections to overlap" do - connections = (0...3).map { DiscourseRedis.new } + connections = 3.times.map { DiscourseRedis.new } scenario = Concurrency::Scenario.new do |execution|