From 090156adebb5c373e05a333f695b9cc7b4fe1905 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 16 Mar 2012 12:15:31 -0700 Subject: [PATCH] use empty? on the hash to avoid another method call --- activesupport/lib/active_support/values/time_zone.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb index da8808cb21..ce46c46092 100644 --- a/activesupport/lib/active_support/values/time_zone.rb +++ b/activesupport/lib/active_support/values/time_zone.rb @@ -266,7 +266,7 @@ module ActiveSupport # Time.zone.parse('22:30:00') # => Fri, 31 Dec 1999 22:30:00 HST -10:00 def parse(str, now=now) date_parts = Date._parse(str) - return if date_parts.blank? + return if date_parts.empty? time = Time.parse(str, now) rescue DateTime.parse(str) if date_parts[:offset].nil? ActiveSupport::TimeWithZone.new(nil, self, time)