From 9cc8a75d84a4a5c52071b5c911f5afe1b577f760 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Tue, 7 Apr 2009 21:03:40 -0700 Subject: Insert in sorted order to avoid TimeZone sort --- activesupport/lib/active_support/values/time_zone.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'activesupport/lib/active_support/values') 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 -- cgit v1.2.3