diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-01 12:18:11 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-06-01 12:18:11 +0300 |
commit | 0319d5b63233e132672b836409b8a073cab05d10 (patch) | |
tree | 89f487a2c6f205fc3f426ebc643abe9e39b07a9b /app | |
parent | 473ea1e974cf07751601904b882de9ee2b3d0618 (diff) |
Enable Style/For rubocop cop
Do not use for, unless you know exactly why.
See #17478
Diffstat (limited to 'app')
-rw-r--r-- | app/models/network/graph.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/network/graph.rb b/app/models/network/graph.rb index 1ac37e0307f..7f3387f87e2 100644 --- a/app/models/network/graph.rb +++ b/app/models/network/graph.rb @@ -205,7 +205,7 @@ module Network # Visit branching chains leaves.each do |l| parents = l.parents(@map).select{|p| p.space.zero?} - for p in parents + parents.each do |p| place_chain(p, l.time) end end @@ -223,7 +223,7 @@ module Network end def mark_reserved(time_range, space) - for day in time_range + time_range.each do |day| @reserved[day].push(space) end end @@ -232,7 +232,7 @@ module Network space_default ||= space_base reserved = [] - for day in time_range + time_range.each do |day| reserved.push(*@reserved[day]) end reserved.uniq! |