From 32c75a6044db2d3b44292d30ae1bd6e25410c52b Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 30 Mar 2010 20:24:43 -0300 Subject: [PATCH] Don't cache the utc_offset we are already caching the timezone [#4301 state:committed] --- .../lib/active_support/values/time_zone.rb | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 3cb4d89..647039b 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -201,7 +201,7 @@ module ActiveSupport end def utc_offset - @utc_offset ||= tzinfo.current_period.utc_offset + tzinfo.current_period.utc_offset end # Returns the offset of this time zone as a formatted string, of the @@ -362,13 +362,14 @@ module ActiveSupport "Wellington" ], [ 46_800, "Nuku'alofa" ]]. each do |offset, *places| - places.sort.each do |place| + places.each do |place| place.freeze zone = new(place, offset) ZONES << zone ZONES_MAP[place] = zone end end + ZONES.sort! ZONES.freeze ZONES_MAP.freeze -- 1.7.0