aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/vendor/builder.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-09-24 17:29:59 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-09-24 17:29:59 -0700
commit772a32a22d71f7a22108719d88c94959ae4942b6 (patch)
tree1ecf8e5c09516149806145a5d55c710316702ab8 /activesupport/lib/active_support/vendor/builder.rb
parent0039c0344c54423413728a92509b42fe7f37d90c (diff)
downloadrails-772a32a22d71f7a22108719d88c94959ae4942b6.tar.gz
rails-772a32a22d71f7a22108719d88c94959ae4942b6.tar.bz2
rails-772a32a22d71f7a22108719d88c94959ae4942b6.zip
Convert the other vendored libs to avoid pulling in old gems. Works even if rubygems isn't loaded.
Diffstat (limited to 'activesupport/lib/active_support/vendor/builder.rb')
-rw-r--r--activesupport/lib/active_support/vendor/builder.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/vendor/builder.rb b/activesupport/lib/active_support/vendor/builder.rb
index ad89e6635d..349825f438 100644
--- a/activesupport/lib/active_support/vendor/builder.rb
+++ b/activesupport/lib/active_support/vendor/builder.rb
@@ -1,6 +1,7 @@
begin
- require 'builder'
-rescue LoadError
- $:.unshift File.expand_path(File.join(File.dirname(__FILE__), 'builder-2.1.2', 'lib'))
- retry
+ gem 'builder', '~> 2.1.2'
+rescue LoadError, NoMethodError
+ $LOAD_PATH.unshift File.expand_path("#{File.dirname(__FILE__)}/builder-2.1.2/lib")
end
+
+require 'builder'