Deep_merge! issue

Hi All,

The i18n gem has a deep_merge! method defined, but so have rails 2.3.x
and rails 3, and all these implementations differ and have different
behavior. I was wondering if all implementations should be consolidated
to the version rails 3 uses ?

The issue I have right now: the 18n gem won’t define its deep_merge!
method if activesupport is loaded earlier; which is always the case if
you run a rails app. This gives the following issue:

Suppose you have your own en.yml file with:

:en
:date
:abbr_day_names: [sun, mon, tue, wed, thu, fri, sat]

( because you want lowercase day names… )

this used to work with rails 2.3.5, but with the rails 2.3.8 and i18n
0.4.0 stack this doesn’t work anymore.

As this key is also in the en.yml file provided by rails, when
+store_translations+ is called it will perform a +deep_merge!+, however,
it will use the deep_merge! version of active support, not of i18n, and
the result is that translations[:en][:date][:abbr_day_names] will be
equal to an empty hash instead of the given array.

I currently use a workaround to redefine the deep_merge! method using
the rails 3 version, overwriting the version activesupport 2.3.8 has.
Obviously I’m not too keen to keep this workaround… any suggestions on
how to consolidate?

Cheers,
Lawrence