diff --git a/lib/safe_yaml.rb b/lib/safe_yaml.rb index 14ee609..a8f8e0a 100644 --- a/lib/safe_yaml.rb +++ b/lib/safe_yaml.rb @@ -3,7 +3,7 @@ # This needs to be defined up front in case any internal classes need to base # their behavior off of this. module SafeYAML - YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck" + YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck") end require "set"