From 0039c0344c54423413728a92509b42fe7f37d90c Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Thu, 24 Sep 2009 17:21:14 -0700 Subject: Avoid inadvertently loading an old tzinfo gem --- activesupport/lib/active_support/vendor.rb | 5 ----- activesupport/lib/active_support/vendor/tzinfo.rb | 9 +++++---- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/vendor.rb b/activesupport/lib/active_support/vendor.rb index 10dbfd9a77..5c79c6a420 100644 --- a/activesupport/lib/active_support/vendor.rb +++ b/activesupport/lib/active_support/vendor.rb @@ -11,11 +11,6 @@ if defined? Gem rescue Gem::LoadError end - begin - gem 'tzinfo', '~> 0.3.13' - rescue Gem::LoadError - end - begin gem 'i18n', '~> 0.1.3' rescue Gem::LoadError diff --git a/activesupport/lib/active_support/vendor/tzinfo.rb b/activesupport/lib/active_support/vendor/tzinfo.rb index 01fba6d632..cc4f086edf 100644 --- a/activesupport/lib/active_support/vendor/tzinfo.rb +++ b/activesupport/lib/active_support/vendor/tzinfo.rb @@ -1,6 +1,7 @@ begin - require 'tzinfo' -rescue LoadError - $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'tzinfo-0.3.13', 'lib')) - retry + gem 'tzinfo', '~> 0.3.13' +rescue Gem::LoadError + $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/tzinfo-0.3.13/lib") end + +require 'tzinfo' -- cgit v1.2.3