diff --git a/lib/uplot/preprocessing.rb b/lib/uplot/preprocessing.rb index 1d27d7e..ac07c35 100644 --- a/lib/uplot/preprocessing.rb +++ b/lib/uplot/preprocessing.rb @@ -13,7 +13,7 @@ module Uplot else if headers.include?(nil) warn "\e[35mHeaders contains nil in it.\e[0m" - elsif headers.include? "" + elsif headers.include? '' warn "\e[35mHeaders contains \"\" in it.\e[0m" end h_size = headers.size diff --git a/test/uplot/preprocessing_test.rb b/test/uplot/preprocessing_test.rb index 81e5d34..f3be617 100644 --- a/test/uplot/preprocessing_test.rb +++ b/test/uplot/preprocessing_test.rb @@ -61,6 +61,7 @@ class UplotPreprocessingTest < Test::Unit::TestCase test :get_series do n = nil + assert_equal([[2, 3], [5, 6], [8, 9]], @m.get_series([[1, 2, 3], [4, 5, 6], [7, 8, 9]], true, true)) @@ -109,11 +110,11 @@ class UplotPreprocessingTest < Test::Unit::TestCase [4, 5, 6], [7, 8, 9]], false, false)) - assert_equal([[1, 2, 3], + assert_equal([[1, 2, 3], [4, 5, n], [6, n, n]], @m.get_series([[1, 4, 6], - [2, 5], - [3]], false, false)) + [2, 5], + [3]], false, false)) assert_equal([[1, 2, 3], [n, 4, 5],