aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/values
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-04-07 21:03:40 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-04-07 21:03:40 -0700
commit9cc8a75d84a4a5c52071b5c911f5afe1b577f760 (patch)
tree1adc84e9719978d4e15f3eb856da4dfb1e3ab7e8 /activesupport/lib/active_support/values
parentf093088433ff7e87fb387e2f2a536f0f3c4906d4 (diff)
downloadrails-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')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb3
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