Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't shadow outer local variables

  • Loading branch information...
commit 4d8e2e3b8ce9841542cc3cf4d33b7a7702b2abc1 1 parent 48f873c
@spastorino spastorino authored josevalim committed
Showing with 5 additions and 5 deletions.
  1. +5 −5 lib/i18n/backend/simple.rb
View
10 lib/i18n/backend/simple.rb
@@ -71,11 +71,11 @@ def lookup(locale, key, scope = [], options = {})
init_translations unless initialized?
keys = I18n.normalize_keys(locale, key, scope, options[:separator])
- keys.inject(translations) do |result, key|
- key = key.to_sym
- return nil unless result.is_a?(Hash) && result.has_key?(key)
- result = result[key]
- result = resolve(locale, key, result, options.merge(:scope => nil)) if result.is_a?(Symbol)
+ keys.inject(translations) do |result, _key|
+ _key = _key.to_sym
+ return nil unless result.is_a?(Hash) && result.has_key?(_key)
+ result = result[_key]
+ result = resolve(locale, _key, result, options.merge(:scope => nil)) if result.is_a?(Symbol)
result
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.