Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert "Simplify method chain (use 'map.with_index')"

This reverts commit a1f0a00.

It doesn't compatible with 1.8.7, ree, rbx-18mode, jruby-18mode.
  • Loading branch information...
commit 73167e059b1471b69532c45b4fd077f0cb1abd66 1 parent 84f6604
@kyrylo kyrylo authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/pry/code.rb
View
2  lib/pry/code.rb
@@ -134,7 +134,7 @@ def initialize(lines=[], start_line=1, code_type=:ruby)
lines = lines.lines
end
- @lines = lines.map.with_index { |l, i| [l.chomp, i + start_line.to_i] }
+ @lines = lines.each_with_index.map { |l, i| [l.chomp, i + start_line.to_i] }
@code_type = code_type
end
Please sign in to comment.
Something went wrong with that request. Please try again.