From 30b3b6e7d3f6789f82dd285e7196d4e4db9410fe Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Thu, 3 Jun 2021 11:03:49 +0900 Subject: [PATCH] Rubocop auto correct --- lib/youplot/backends/processing.rb | 2 +- lib/youplot/parser.rb | 4 ++-- test/youplot/iris_test.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/youplot/backends/processing.rb b/lib/youplot/backends/processing.rb index d7bf909..58fa034 100644 --- a/lib/youplot/backends/processing.rb +++ b/lib/youplot/backends/processing.rb @@ -21,7 +21,7 @@ module YouPlot # compare values r = b[1] <=> a[1] # If the values are the same, compare by name - r = a[0] <=> b[0] if r == 0 + r = a[0] <=> b[0] if r.zero? r end diff --git a/lib/youplot/parser.rb b/lib/youplot/parser.rb index a9d7130..d1d0cd9 100644 --- a/lib/youplot/parser.rb +++ b/lib/youplot/parser.rb @@ -163,8 +163,8 @@ module YouPlot end def sub_parser_add_canvas - canvas_types = UnicodePlot::Canvas::CANVAS_CLASS_MAP.keys.join(", ") - sub_parser.on_head('--canvas STR', String, "type of canvas", "(#{canvas_types})") do |v| + canvas_types = UnicodePlot::Canvas::CANVAS_CLASS_MAP.keys.join(', ') + sub_parser.on_head('--canvas STR', String, 'type of canvas', "(#{canvas_types})") do |v| params.canvas = v.to_sym end end diff --git a/test/youplot/iris_test.rb b/test/youplot/iris_test.rb index bb9223c..4246d99 100644 --- a/test/youplot/iris_test.rb +++ b/test/youplot/iris_test.rb @@ -109,7 +109,7 @@ class YouPlotIRISTest < Test::Unit::TestCase assert_equal fixture('iris-boxplot.txt'), @stderr_file.read end - # Yeah, lineplot/lineplots don't make sense too. + # Yeah, lineplot/lineplots don't make sense too. # Just checking the behavior. test :c do