diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-07 21:03:40 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-07 21:03:40 -0700 |
commit | 9cc8a75d84a4a5c52071b5c911f5afe1b577f760 (patch) | |
tree | 1adc84e9719978d4e15f3eb856da4dfb1e3ab7e8 /activesupport/lib/active_support/values/time_zone.rb | |
parent | f093088433ff7e87fb387e2f2a536f0f3c4906d4 (diff) | |
download | rails-9cc8a75d84a4a5c52071b5c911f5afe1b577f760.tar.gz rails-9cc8a75d84a4a5c52071b5c911f5afe1b577f760.tar.bz2 rails-9cc8a75d84a4a5c52071b5c911f5afe1b577f760.zip |
Insert in sorted order to avoid TimeZone sort
Diffstat (limited to 'activesupport/lib/active_support/values/time_zone.rb')
-rw-r--r-- | activesupport/lib/active_support/values/time_zone.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index bfec0711ad..e2d759aa50 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -363,14 +363,13 @@ module ActiveSupport "Wellington" ], [ 46_800, "Nuku'alofa" ]]. each do |offset, *places| - places.each do |place| + places.sort.each do |place| place.freeze zone = new(place, offset) ZONES << zone ZONES_MAP[place] = zone end end - ZONES.sort! ZONES.freeze ZONES_MAP.freeze |