diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-08 18:08:48 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-08 18:08:48 -0700 |
commit | dc0aed1151f418c417770539629d26fa34c03815 (patch) | |
tree | 199d3884a2cd20165c62ed47284baddb4abf0b25 /activesupport | |
parent | 621f48edb27022a0798d083e50339c552221d0bf (diff) | |
download | rails-dc0aed1151f418c417770539629d26fa34c03815.tar.gz rails-dc0aed1151f418c417770539629d26fa34c03815.tar.bz2 rails-dc0aed1151f418c417770539629d26fa34c03815.zip |
Don't shadow arg with block var
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/core_ext/enumerable.rb | 4 |
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) |