1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

Simplify method chain (use 'map.with_index')

Signed-off-by: Kyrylo Silin <kyrylosilin@gmail.com>
This commit is contained in:
Kyrylo Silin 2013-01-03 02:04:20 +02:00
parent d4ba9ff39a
commit a1f0a00b65

View file

@ -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