summaryrefslogtreecommitdiff
path: root/lib/bundler/psyched_yaml.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-10-18 22:10:51 -1000
committerAndre Arko <andre@arko.net>2011-10-18 22:12:34 -1000
commit0171be663257483af27f4690959c47b049f617cb (patch)
treee1b318573f2f3a4637cbbdeea6dbeaf97859bf6b /lib/bundler/psyched_yaml.rb
parente65e53f73c1aa05a4be025ba229041364db7698f (diff)
downloadbundler-0171be663257483af27f4690959c47b049f617cb.tar.gz
extract the complex Psych-loading process
Diffstat (limited to 'lib/bundler/psyched_yaml.rb')
-rw-r--r--lib/bundler/psyched_yaml.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb
new file mode 100644
index 0000000000..079543b67e
--- /dev/null
+++ b/lib/bundler/psyched_yaml.rb
@@ -0,0 +1,15 @@
+# Psych could be a gem
+begin
+ gem 'psych'
+rescue Gem::LoadError
+end
+
+# Psych could be a stdlib
+begin
+ # it's too late if Syck is already loaded
+ require 'psych' unless defined?(Syck)
+rescue LoadError
+end
+
+# Psych might NOT EXIST AT ALL
+require 'yaml'