Skip to content

Commit

Permalink
make thread key fetching compatible with older rubies
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 4, 2021
1 parent 1f2e328 commit 9d4ee1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/i18n/backend/fallbacks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class << self
# Returns the current fallbacks implementation. Defaults to +I18n::Locale::Fallbacks+.
def fallbacks
@@fallbacks ||= I18n::Locale::Fallbacks.new
Thread.current.fetch(:i18n_fallbacks, @@fallbacks)
Thread.current.key?(:i18n_fallbacks) ? Thread.current[:i18n_fallbacks] : @@fallbacks
end

# Sets the current fallbacks implementation. Use this to set a different fallbacks implementation.
Expand Down

0 comments on commit 9d4ee1a

Please sign in to comment.