Browse files

use empty? on the hash to avoid another method call

  • Loading branch information...
1 parent 4c8a5a0 commit 090156adebb5c373e05a333f695b9cc7b4fe1905 @tenderlove tenderlove committed Mar 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/values/time_zone.rb
View
2 activesupport/lib/active_support/values/time_zone.rb
@@ -266,7 +266,7 @@ def at(secs)
# 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)

0 comments on commit 090156a

Please sign in to comment.