Skip to content

Commit 653e8b6

Browse files
committed
Comments for Rubcop's automatic correction
1 parent 9f00f56 commit 653e8b6

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/youplot/backends/unicode_plot.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,10 @@ def check_series_size(data, fmt)
211211
# NOTE: Error messages cannot be colored.
212212
YouPlot.run_as_executable ? exit(1) : raise(Error)
213213
end
214-
if fmt == 'xyxy' && series.size.odd?
214+
215+
# if fmt == 'xyxy' && series.size is odd, the number of series is not even.
216+
return unless fmt == 'xyxy' && series.size.odd?
217+
215218
warn <<~EOS
216219
YouPlot: In the xyxy format, the number of series must be even.
217220
@@ -220,7 +223,6 @@ def check_series_size(data, fmt)
220223
EOS
221224
# NOTE: Error messages cannot be colored.
222225
YouPlot.run_as_executable ? exit(1) : raise(Error)
223-
end
224226
end
225227
end
226228
end

0 commit comments

Comments
 (0)