Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

bug: map_with_index should use each_with_index

  • Loading branch information...
commit a106fff0087e7e3dee1da7d6af6244883e68a54d 1 parent 5561aee
@trans trans authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/core/facets/enumerable/map_with_index.rb
View
4 lib/core/facets/enumerable/map_with_index.rb
@@ -9,8 +9,8 @@ module Enumerable
def map_with_index
r = []
- each_index do |i|
- r << yield(self[i], i)
+ each_with_index do |e, i|
+ r << yield(e, i)
end
r
end
Please sign in to comment.
Something went wrong with that request. Please try again.