Moved comments to make method chaining work in Ruby 2.6 and below

This commit is contained in:
kojix2 2021-05-28 10:43:05 +09:00
parent a4e747969f
commit 8f52955c19

View File

@ -14,11 +14,11 @@ module YouPlot
# value_counts Enumerable::Statistics
arr.value_counts(dropna: false)
end
# faster than `.sort_by{|a| a[1]}`, `.sort_by(a:last)`
# `.sort{ |a, b| -a[1] <=> -b[1] }
.sort { |a, b| a[1] <=> b[1] }
.reverse
.transpose
# faster than `.sort_by{|a| a[1]}`, `.sort_by(a:last)`
# `.sort{ |a, b| -a[1] <=> -b[1] }
end
end
end