Skip to content

Commit 25e2e15

Browse files
committed
Support Ruby 2.2
The syck engine and YAML::ENGINE will be removed. https://bugs.ruby-lang.org/issues/8344
1 parent e8c10fd commit 25e2e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/safe_yaml/load.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This needs to be defined up front in case any internal classes need to base
55
# their behavior off of this.
66
module SafeYAML
7-
YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
7+
YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")
88
end
99

1010
require "safe_yaml/libyaml_checker"

0 commit comments

Comments
 (0)