aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-09-07 05:20:52 -0700
committerJon Leighton <j@jonathanleighton.com>2011-09-07 05:20:52 -0700
commitfb5dbe8c75e43284af80b7fceb4300980a0be0de (patch)
tree07a54399fd167a64acb9a511114990348d6430f0
parent2b354fed34ba78797c9fbe1d0f29c0337f9f6411 (diff)
parent2147f35df251f215d845e870f21fd4010976eba3 (diff)
downloadrails-fb5dbe8c75e43284af80b7fceb4300980a0be0de.tar.gz
rails-fb5dbe8c75e43284af80b7fceb4300980a0be0de.tar.bz2
rails-fb5dbe8c75e43284af80b7fceb4300980a0be0de.zip
Merge pull request #2911 from toolmantim/patch-1
Make sure require_tzinfo only calls Kernel#require if TZInfo isn't alread
-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 4fb487ade1..35f400f9df 100644
--- a/activesupport/lib/active_support/values/time_zone.rb
+++ b/activesupport/lib/active_support/values/time_zone.rb
@@ -371,7 +371,7 @@ module ActiveSupport
protected
def require_tzinfo
- require 'tzinfo'
+ require 'tzinfo' unless defined?(::TZInfo)
rescue LoadError
$stderr.puts "You don't have tzinfo installed in your application. Please add it to your Gemfile and run bundle install"
raise