Skip to content

Commit

Permalink
Don't shadow local with black arg
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy committed Nov 7, 2008
1 parent 66d4b55 commit 983dc80
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activesupport/lib/active_support/rescuable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def rescue_with_handler(exception)
def handler_for_rescue(exception)
# We go from right to left because pairs are pushed onto rescue_handlers
# as rescue_from declarations are found.
_, handler = Array(rescue_handlers).reverse.detect do |klass_name, handler|
_, rescuer = Array(rescue_handlers).reverse.detect do |klass_name, handler|
# The purpose of allowing strings in rescue_from is to support the
# declaration of handler associations for exception classes whose
# definition is yet unknown.
Expand All @@ -97,11 +97,11 @@ def handler_for_rescue(exception)
exception.is_a?(klass) if klass
end

case handler
case rescuer
when Symbol
method(handler)
method(rescuer)
when Proc
handler.bind(self)
rescuer.bind(self)
end
end
end
Expand Down

0 comments on commit 983dc80

Please sign in to comment.