Skip to content

Commit

Permalink
Don't shadow an outer variable inside a block
Browse files Browse the repository at this point in the history
  • Loading branch information
snusnu committed Jul 8, 2013
1 parent 8df2e97 commit 30eea3d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/substation/chain/dsl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,11 @@ def failure_chain(name, chain)
#
# @api private
def processor(name)
processor = @processors.find { |processor| processor.name == name }
unless processor
found = @processors.find { |processor| processor.name == name }
unless found
raise UnknownProcessor, "No processor named #{name.inspect} is registered"
end
processor
found
end

# Replace +processor+'s failure chain with +chain+
Expand Down

0 comments on commit 30eea3d

Please sign in to comment.