aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/values/time_zone.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/values/time_zone.rb')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index d805381d1e..26906d2911 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -227,11 +227,11 @@ module ActiveSupport
def [](arg)
case arg
when String
- begin
- @lazy_zones_map[arg] ||= create(arg)
- rescue TZInfo::InvalidTimezoneIdentifier
- nil
- end
+ begin
+ @lazy_zones_map[arg] ||= create(arg)
+ rescue TZInfo::InvalidTimezoneIdentifier
+ nil
+ end
when Numeric, ActiveSupport::Duration
arg *= 3600 if arg.abs <= 13
all.find { |z| z.utc_offset == arg.to_i }