aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/enumerable.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2008-09-08 18:08:48 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2008-09-08 18:08:48 -0700
commitdc0aed1151f418c417770539629d26fa34c03815 (patch)
tree199d3884a2cd20165c62ed47284baddb4abf0b25 /activesupport/lib/active_support/core_ext/enumerable.rb
parent621f48edb27022a0798d083e50339c552221d0bf (diff)
downloadrails-dc0aed1151f418c417770539629d26fa34c03815.tar.gz
rails-dc0aed1151f418c417770539629d26fa34c03815.tar.bz2
rails-dc0aed1151f418c417770539629d26fa34c03815.zip
Don't shadow arg with block var
Diffstat (limited to 'activesupport/lib/active_support/core_ext/enumerable.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/enumerable.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/enumerable.rb b/activesupport/lib/active_support/core_ext/enumerable.rb
index fd94bc051f..788f3a7e9e 100644
--- a/activesupport/lib/active_support/core_ext/enumerable.rb
+++ b/activesupport/lib/active_support/core_ext/enumerable.rb
@@ -77,9 +77,9 @@ module Enumerable
# (1..5).each_with_object(1) { |value, memo| memo *= value } # => 1
#
def each_with_object(memo, &block)
- returning memo do |memo|
+ returning memo do |m|
each do |element|
- block.call(element, memo)
+ block.call(element, m)
end
end
end unless [].respond_to?(:each_with_object)