From 2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd Mon Sep 17 00:00:00 2001 From: thedarkone Date: Wed, 7 Aug 2013 17:21:57 +0200 Subject: Remove AS::TZ.lookup(name). The method doesn't really make much sense (find_tzinfo will succeed for any imput provided). --- activesupport/lib/active_support/values/time_zone.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index b8e6b06087..b6d9257f00 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -379,7 +379,7 @@ module ActiveSupport case arg when String begin - lazy_zones_map[arg] ||= lookup(arg).tap { |tz| tz.utc_offset } + lazy_zones_map[arg] ||= create(arg).tap { |tz| tz.utc_offset } rescue TZInfo::InvalidTimezoneIdentifier nil end @@ -408,10 +408,6 @@ module ActiveSupport private - def lookup(name) - (tzinfo = find_tzinfo(name)) && create(tzinfo.name.freeze) - end - def lazy_zones_map require_tzinfo @lazy_zones_map -- cgit v1.2.3