aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/values
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-03-16 12:15:31 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2012-03-16 12:15:31 -0700
commit090156adebb5c373e05a333f695b9cc7b4fe1905 (patch)
tree4a717cf32de13a5c468308779cb0f4c6c5024be4 /activesupport/lib/active_support/values
parent4c8a5a0087774f7c8dbdd8900bea1276735d1c54 (diff)
downloadrails-090156adebb5c373e05a333f695b9cc7b4fe1905.tar.gz
rails-090156adebb5c373e05a333f695b9cc7b4fe1905.tar.bz2
rails-090156adebb5c373e05a333f695b9cc7b4fe1905.zip
use empty? on the hash to avoid another method call
Diffstat (limited to 'activesupport/lib/active_support/values')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb2
1 files changed, 1 insertions, 1 deletions
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)