Browse files

Ruby 1.9.2 does not have Psych::Exception

  • Loading branch information...
1 parent 8b1ff9d commit e3b2efff3002e0f9778892a7d03fe4dc4ee61e7a @drbrain committed Mar 2, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/hoe/travis.rb
View
6 lib/hoe/travis.rb
@@ -101,7 +101,11 @@ module Hoe::Travis
VERSION = '1.0'
YAML_EXCEPTIONS = if defined?(Psych) then # :nodoc:
- [Psych::Exception, Psych::SyntaxError]
+ if Psych.const_defined? :Exception then
+ [Psych::SyntaxError] # Ruby 1.9.2
+ else
+ [Psych::Exception, Psych::SyntaxError]
+ end
else
[YAML::Error]
end

0 comments on commit e3b2eff

Please sign in to comment.