提交 78e4d88c 编写于 作者: L Leigh Caplan 提交者: José Valim

Rewrite the clause to pluck the existing value from zones_map before...

Rewrite the clause to pluck the existing value from zones_map before performing a lookup. [#4942 state:resolved]
Signed-off-by: NJosé Valim <jose.valim@gmail.com>
上级 ac42e695
......@@ -387,8 +387,10 @@ def zones_map
def [](arg)
case arg
when String
if tz = lookup(arg)
zones_map[arg] ||= tz
if tz = zones_map[arg]
tz
elsif tz = lookup(arg)
zones_map[arg] = tz
end
when Numeric, ActiveSupport::Duration
arg *= 3600 if arg.abs <= 13
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册