From 841468954bf1e55ad596f4159725cf3dce3e0492 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 24 Jan 2017 23:28:07 +0000 Subject: oldweb: use flat_map instead of flatten.map chain `flat_map' was introduced in Ruby 1.9.2 and reduces the amount of garbage we generate. --- lib/oldweb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/oldweb.rb b/lib/oldweb.rb index 95b7171..b1b7c46 100644 --- a/lib/oldweb.rb +++ b/lib/oldweb.rb @@ -202,7 +202,7 @@ class Oldweb return unless @store @classes = @store.all_classes_and_modules.sort @files = @store.all_files.sort - @methods = @classes.map(&:method_list).flatten.sort + @methods = @classes.flat_map(&:method_list).sort @modsort = @classes.select(&:display?).sort end -- cgit v1.2.3-24-ge0c7