mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 12:27:16 +08: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
@ -48,7 +48,7 @@ class ContentBuffer
|
||||
@lines.insert(start_row + i, line)
|
||||
i += 1
|
||||
end
|
||||
@lines.insert(i, "") unless @lines.length > i
|
||||
@lines.insert(i, "") if @lines.length <= i
|
||||
@lines[i] = split[-1] + @lines[i]
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user