Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #2913 from toolmantim/3-1-stable

Make sure require_tzinfo only calls Kernel#require if TZInfo isn't already present
  • Loading branch information...
commit 4a2e619a1a4193c698a656e7f6ca80ef1e0e4b3c 2 parents 759f3e5 + d6d4740
@tenderlove tenderlove authored
View
2  activesupport/CHANGELOG
@@ -1,5 +1,7 @@
*Rails 3.1.1 (unreleased)*
+* Fixed performance issue where TimeZone lookups would require tzinfo each time [Tim Lucas]
+
* ActiveSupport::OrderedHash is now marked as extractable when using Array#extract_options! [Prem Sichanugrist]
*Rails 3.1.0 (August 30, 2011)*
View
2  activesupport/lib/active_support/values/time_zone.rb
@@ -373,7 +373,7 @@ def us_zones
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
Please sign in to comment.
Something went wrong with that request. Please try again.