aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorthedarkone <thedarkone2@gmail.com>2013-08-07 17:21:57 +0200
committerthedarkone <thedarkone2@gmail.com>2013-08-07 17:21:57 +0200
commit2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd (patch)
treeb6ee0e8be710e27345276e8cd53e1464067aa660 /activesupport
parentc4e5db4d451e1537ab96405193150e3785f3ecf9 (diff)
downloadrails-2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd.tar.gz
rails-2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd.tar.bz2
rails-2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd.zip
Remove AS::TZ.lookup(name).
The method doesn't really make much sense (find_tzinfo will succeed for any imput provided).
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb6
1 files changed, 1 insertions, 5 deletions
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