Skip to content

Commit

Permalink
Merge pull request #12 from yosipy/psych-version
Browse files Browse the repository at this point in the history
Psych less than 4.0.0 can be put in Ruby3.1
  • Loading branch information
yosipy authored Jul 5, 2023
2 parents 18f2837 + 5252f7b commit 9ecdf47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/yaml_structure_checker/loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ 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)
end
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)
Expand Down

0 comments on commit 9ecdf47

Please sign in to comment.