From 26c235da7ad0529fe3aaa5a023503138cf8cf7c9 Mon Sep 17 00:00:00 2001 From: Rafael Souza Date: Fri, 26 Dec 2014 16:45:08 -0200 Subject: [PATCH] add support for ruby 2.2 --- lib/safe_yaml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"