From 10ace7d99aa3d2a26beb14d5cd4b080b88619ed2 Mon Sep 17 00:00:00 2001 From: Alpha Chen Date: Tue, 10 Dec 2019 21:28:06 -0800 Subject: [PATCH] [2019][ruby][11.x] use sum instead of a block --- 2019/ruby/day_11.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2019/ruby/day_11.rb b/2019/ruby/day_11.rb index be15da5..7accfe2 100644 --- a/2019/ruby/day_11.rb +++ b/2019/ruby/day_11.rb @@ -35,7 +35,7 @@ t = Thread.new { when :down then [ 0, -1] when :left then [-1, 0] end - robot.panel = robot.panel.zip(delta).map {|a,b| a + b } + robot.panel = robot.panel.zip(delta).map(&:sum) end }