From d1374f99bf3090f3e659687c112ed0c5c0865cfb Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Mon, 27 Oct 2014 17:28:53 +0100 Subject: Pass symbol as an argument instead of a block --- activesupport/lib/active_support/values/time_zone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/values/time_zone.rb') diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index 55533a5d40..fd05a5459c 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -237,7 +237,7 @@ module ActiveSupport case arg when String begin - @lazy_zones_map[arg] ||= create(arg).tap { |tz| tz.utc_offset } + @lazy_zones_map[arg] ||= create(arg).tap(&:utc_offset) rescue TZInfo::InvalidTimezoneIdentifier nil end -- cgit v1.2.3