End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Psych.load_file
load_file(filename, **kwargs)
ext/psych/lib/psych.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/psych/lib/psych.rb, line 581
def self.unsafe_load_file filename, **kwargs
File.open(filename, 'r:bom|utf-8') { |f|
self.unsafe_load f, filename: filename, **kwargs
}
end
Alias of .unsafe_load_file
Load the document contained in filename. Returns the yaml contained in filename as a Ruby object, or if the file is empty, it returns the specified fallback return value, which defaults to false.
NOTE: This method *should not* be used to parse untrusted documents, such as YAML documents that are supplied via user input. Instead, please use the safe_load_file method.
See also
.unsafe_load_file
.load
.load_stream
.libyaml_version
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1