diff --git a/.rubocop.yml b/.rubocop.yml index 0946ef5d8488cbee69081bd95635e993085f2e1c..3f5a7052694c5722fb74e17101ac6d9c5a5dcf0d 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -299,7 +299,7 @@ Style/IndentHash: # Use Kernel#loop for infinite loops. Style/InfiniteLoop: - Enabled: false + Enabled: true # Use the new lambda literal syntax for single-line blocks. Style/Lambda: diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index f4e90125373dba51119c47fc2c822798e22400d5..9259cb1a0fa9af909e90d408c4cfb2ed69af1a0b 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -253,7 +253,7 @@ module Network leaves = [] leaves.push(commit) if commit.space.zero? - while true + loop do return leaves if commit.parents(@map).count.zero? commit = commit.parents(@map).first