End of Life Ruby 3.2 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.2.0/ext/psych/lib/psych.rb, line 669
def self.load_file filename, **kwargs
File.open(filename, 'r:bom|utf-8') { |f|
self.load f, filename: filename, **kwargs
}
end
Loads 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. See load for options.