diff options
Diffstat (limited to 'lib/bundler/psyched_yaml.rb')
-rw-r--r-- | lib/bundler/psyched_yaml.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/psyched_yaml.rb b/lib/bundler/psyched_yaml.rb index fe1a701684..70bd4b7f71 100644 --- a/lib/bundler/psyched_yaml.rb +++ b/lib/bundler/psyched_yaml.rb @@ -16,5 +16,9 @@ module Bundler # On encountering invalid YAML, # Psych raises Psych::SyntaxError # Syck raises ArgumentError - YamlSyntaxError = defined?(Psych) ? Psych::SyntaxError : ArgumentError + if defined?(::Psych::SyntaxError) + YamlSyntaxError = ::Psych::SyntaxError + else + YamlSyntaxError = ::ArgumentError + end end |