Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. 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.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0