Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Psych.parse_file

parse_file(filename, fallback: false)

Parse a file at filename. Returns the Psych::Nodes::Document.

Raises a Psych::SyntaxError when a YAML syntax error is detected.

See also .parse .parser .load_stream .parse_stream also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1