class Object

Public Instance Methods

yaml_safe_load(path) click to toggle source

:nocov: @param [ String ] path The path of the file to load

# File lib/opt_parse_validator/config_files_loader_merger.rb, line 9
def yaml_safe_load(path)
  if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0.pre1') # Ruby 2.6
    YAML.safe_load(File.read(path), permitted_classes: [Regexp]) || {}
  else
    YAML.safe_load(File.read(path), [Regexp]) || {}
  end
end