Permalink
Browse files

Remove AS::TZ.lookup(name).

The method doesn't really make much sense (find_tzinfo will succeed for any imput provided).
  • Loading branch information...
1 parent c4e5db4 commit 2a8c2582c9023f4ac02fe9f09f61c4f9c88e4ebd @thedarkone thedarkone committed Aug 7, 2013
Showing with 1 addition and 5 deletions.
  1. +1 −5 activesupport/lib/active_support/values/time_zone.rb
@@ -379,7 +379,7 @@ def [](arg)
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 @@ def require_tzinfo
private
- def lookup(name)
- (tzinfo = find_tzinfo(name)) && create(tzinfo.name.freeze)
- end
-
def lazy_zones_map
require_tzinfo
@lazy_zones_map

0 comments on commit 2a8c258

Please sign in to comment.