aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-19 11:04:23 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-19 11:04:23 -0500
commit8c2e839e5a0fb1662ae867c70114c3fc91850a55 (patch)
treec0f7d90af058e91a588ce4f3bf63891c40690f69
parentd84d99a8f7dc672b050a6ab891c1680a323a7c97 (diff)
downloadrails-8c2e839e5a0fb1662ae867c70114c3fc91850a55.tar.gz
rails-8c2e839e5a0fb1662ae867c70114c3fc91850a55.tar.bz2
rails-8c2e839e5a0fb1662ae867c70114c3fc91850a55.zip
Fix some warnings in i18n lib
-rwxr-xr-xactivesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n.rb6
-rw-r--r--activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb4
2 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n.rb b/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n.rb
index 2185194da9..1bb65263a3 100755
--- a/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n.rb
+++ b/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n.rb
@@ -53,7 +53,7 @@ module I18n
# storage. Decoupled for backends like a db backend that persist their
# translations, so the backend can decide whether/when to yield or not.
def populate(&block)
- backend.populate &block
+ backend.populate(&block)
end
# Stores translations for the given locale in the backend.
@@ -173,8 +173,8 @@ module I18n
# keys are Symbols.
def normalize_translation_keys(locale, key, scope)
keys = [locale] + Array(scope) + [key]
- keys = keys.map{|key| key.to_s.split(/\./) }
- keys.flatten.map{|key| key.to_sym}
+ keys = keys.map{|k| k.to_s.split(/\./) }
+ keys.flatten.map{|k| k.to_sym}
end
end
end
diff --git a/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb b/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb
index 284f2bfcbd..b8be1cecfb 100644
--- a/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb
+++ b/activesupport/lib/active_support/vendor/i18n-0.0.1/lib/i18n/backend/simple.rb
@@ -23,7 +23,7 @@ module I18n
def translate(locale, key, options = {})
raise InvalidLocale.new(locale) if locale.nil?
- return key.map{|key| translate locale, key, options } if key.is_a? Array
+ return key.map{|k| translate locale, k, options } if key.is_a? Array
reserved = :scope, :default
count, scope, default = options.values_at(:count, *reserved)
@@ -66,7 +66,7 @@ module I18n
def lookup(locale, key, scope = [])
return unless key
keys = I18n.send :normalize_translation_keys, locale, key, scope
- keys.inject(@@translations){|result, key| result[key.to_sym] or return nil }
+ keys.inject(@@translations){|result, k| result[k.to_sym] or return nil }
end
# Evaluates a default translation.