aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/values
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-04-25 17:07:55 +1000
committerMikel Lindsaar <raasdnil@gmail.com>2010-04-25 17:07:55 +1000
commite1b255aca456a5b456111b09237805fd32d15111 (patch)
treea87c8b8989449a9dbdf1c6897901f6957ec021dc /activesupport/lib/active_support/values
parent60ab54113fa833a1258d687673561b9474964149 (diff)
parenta5955196f2ed8a69c49a1a8c0c617ab91cb8d716 (diff)
downloadrails-e1b255aca456a5b456111b09237805fd32d15111.tar.gz
rails-e1b255aca456a5b456111b09237805fd32d15111.tar.bz2
rails-e1b255aca456a5b456111b09237805fd32d15111.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'activesupport/lib/active_support/values')
-rw-r--r--activesupport/lib/active_support/values/time_zone.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
index 03b324764b..9db6bbafca 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -1,4 +1,5 @@
require 'active_support/core_ext/object/blank'
+require 'active_support/core_ext/object/try'
# The TimeZone class serves as a wrapper around TZInfo::Timezone instances. It allows us to do the following:
#
@@ -205,8 +206,8 @@ module ActiveSupport
if @utc_offset
@utc_offset
else
- @current_period ||= tzinfo.current_period
- @current_period.utc_offset
+ @current_period ||= tzinfo.try(:current_period)
+ @current_period.try(:utc_offset)
end
end