about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-24 23:28:07 +0000
committerEric Wong <e@80x24.org>2017-01-24 23:28:24 +0000
commit841468954bf1e55ad596f4159725cf3dce3e0492 (patch)
treeb716c9bdcb7b8d796772209f5db7a91b1003e201
parentd8468cf824b235685e55d5b2765165954816c133 (diff)
downloadolddoc-841468954bf1e55ad596f4159725cf3dce3e0492.tar.gz
`flat_map' was introduced in Ruby 1.9.2 and reduces
the amount of garbage we generate.
-rw-r--r--lib/oldweb.rb2
1 files changed, 1 insertions, 1 deletions
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