From 5252f7b4afde92dcc309c6846b29b69fd1ced235 Mon Sep 17 00:00:00 2001 From: yosipy Date: Wed, 5 Jul 2023 20:14:31 +0900 Subject: [PATCH] Branch processing by Psych version instead of Ruby version. --- lib/yaml_structure_checker/loader.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/yaml_structure_checker/loader.rb b/lib/yaml_structure_checker/loader.rb index efcd1f6..ac2178e 100644 --- a/lib/yaml_structure_checker/loader.rb +++ b/lib/yaml_structure_checker/loader.rb @@ -25,7 +25,7 @@ def initialize(settings_path) end def self.yaml_load_file(path) - if RUBY_VERSION > '3.1.0' + if Psych::VERSION > '4.0.0' YAML.load_file(path, aliases: true) else YAML.load_file(path) @@ -33,7 +33,7 @@ def self.yaml_load_file(path) end def self.yaml_safe_load_file(path) - if RUBY_VERSION > '3.1.0' + if Psych::VERSION > '4.0.0' YAML.safe_load_file(path) else YAML.load_file(path)