From 8f52955c194726af9c4b9db8c16df74f4047b82b Mon Sep 17 00:00:00 2001 From: kojix2 <2xijok@gmail.com> Date: Fri, 28 May 2021 10:43:05 +0900 Subject: [PATCH] Moved comments to make method chaining work in Ruby 2.6 and below --- lib/youplot/backends/processing.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/youplot/backends/processing.rb b/lib/youplot/backends/processing.rb index bff0b4e..317ed37 100644 --- a/lib/youplot/backends/processing.rb +++ b/lib/youplot/backends/processing.rb @@ -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