From ab4c900656db249caa6ff363a932168695b9021e Mon Sep 17 00:00:00 2001 From: brainopia Date: Sun, 4 Jan 2015 19:39:49 +0300 Subject: Use directly TZInfo::Timezone without proxy Since real timezone is loaded anyway in `#utc_offset` which is called during `#create` --- activesupport/lib/active_support/values/time_zone.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index fd05a5459c..17629eabb3 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -202,7 +202,7 @@ module ActiveSupport end def find_tzinfo(name) - TZInfo::TimezoneProxy.new(MAPPING[name] || name) + TZInfo::Timezone.new(MAPPING[name] || name) end alias_method :create, :new @@ -237,7 +237,7 @@ module ActiveSupport case arg when String begin - @lazy_zones_map[arg] ||= create(arg).tap(&:utc_offset) + @lazy_zones_map[arg] ||= create(arg) rescue TZInfo::InvalidTimezoneIdentifier nil end -- cgit v1.2.3