Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[Performance] Avoid a repeated thread-local access.

  • Loading branch information...
commit 8a7b92ea0c3d1777685e3e449ec204b861a4be01 1 parent 8c897e9
@thedarkone authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/i18n.rb
View
5 lib/i18n.rb
@@ -146,8 +146,9 @@ def translate(key, options={})
key = nil
end
- backend = config.backend
- locale = options.delete(:locale) || config.locale
+ conf = config
+ backend = conf.backend
+ locale = options.delete(:locale) || conf.locale
result = catch(:exception) do
if key.is_a?(Array)
Please sign in to comment.
Something went wrong with that request. Please try again.