mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-06 07:10:10 +08:00
Make tests pass in Ruby 2.4
This commit is contained in:
parent
d9777435a4
commit
f823377c50
@ -18,7 +18,7 @@ module YouPlot
|
|||||||
# compare values
|
# compare values
|
||||||
r = b[1] <=> a[1]
|
r = b[1] <=> a[1]
|
||||||
# If the values are the same, compare by name
|
# 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
|
r
|
||||||
end
|
end
|
||||||
.transpose
|
.transpose
|
||||||
|
@ -14,7 +14,7 @@ module YouPlot
|
|||||||
|
|
||||||
# Remove blank lines
|
# Remove blank lines
|
||||||
arr.delete_if do |i|
|
arr.delete_if do |i|
|
||||||
i == [] or i.all? nil
|
i == [] or i.all?(&:nil?)
|
||||||
end
|
end
|
||||||
|
|
||||||
# get header
|
# get header
|
||||||
|
@ -12,7 +12,7 @@ module YouPlot
|
|||||||
:progressive,
|
:progressive,
|
||||||
:encoding,
|
:encoding,
|
||||||
:color_names,
|
:color_names,
|
||||||
:debug,
|
:debug
|
||||||
keyword_init: true
|
# keyword_init: true
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -15,16 +15,16 @@ module YouPlot
|
|||||||
@command = nil
|
@command = nil
|
||||||
|
|
||||||
@options = Options.new(
|
@options = Options.new(
|
||||||
delimiter: "\t",
|
"\t", # elimiter:
|
||||||
transpose: false,
|
false, # transpose:
|
||||||
headers: nil,
|
nil, # headers:
|
||||||
pass: false,
|
false, # pass:
|
||||||
output: $stderr,
|
$stderr, # output:
|
||||||
fmt: 'xyy',
|
'xyy', # fmt:
|
||||||
progressive: false,
|
false, # progressive:
|
||||||
encoding: nil,
|
nil, # encoding:
|
||||||
color_names: false,
|
false, # color_names:
|
||||||
debug: false
|
false # debug:
|
||||||
)
|
)
|
||||||
|
|
||||||
@params = Parameters.new
|
@params = Parameters.new
|
||||||
|
Loading…
Reference in New Issue
Block a user