1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activesupport/lib/active_support/i18n.rb
Ryunosuke SATO cfd85255d6 Supress warning about method redifinition
In i18n gem, the following methods are defined.
- `Hash#except`
- `Hash#slice`

But if there are defined already, i18n skips these definitions.
So these definition by `active_support` are required before `require 'i18n'`.
2013-02-11 02:29:24 +09:00

13 lines
447 B
Ruby

begin
require 'active_support/core_ext/hash/deep_merge'
require 'active_support/core_ext/hash/except'
require 'active_support/core_ext/hash/slice'
require 'i18n'
require 'active_support/lazy_load_hooks'
rescue LoadError => e
$stderr.puts "The i18n gem is not available. Please add it to your Gemfile and run bundle install"
raise e
end
ActiveSupport.run_load_hooks(:i18n)
I18n.load_path << "#{File.dirname(__FILE__)}/locale/en.yml"