From a1f0a00b65ca9394e7a2071c6a2d6384cbe43e44 Mon Sep 17 00:00:00 2001 From: Kyrylo Silin Date: Thu, 3 Jan 2013 02:04:20 +0200 Subject: [PATCH] Simplify method chain (use 'map.with_index') Signed-off-by: Kyrylo Silin --- lib/pry/code.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pry/code.rb b/lib/pry/code.rb index b605eab9..610b4f1f 100644 --- a/lib/pry/code.rb +++ b/lib/pry/code.rb @@ -134,7 +134,7 @@ class Pry lines = lines.lines end - @lines = lines.each_with_index.map { |l, i| [l.chomp, i + start_line.to_i] } + @lines = lines.map.with_index { |l, i| [l.chomp, i + start_line.to_i] } @code_type = code_type end