errors -> ArrayRuby 3.3 から[permalink][rdoc][edit]-
構文解析中に発生したエラー(Prism::ParseError のインスタンス)の配列を返します。エラーがなければ空配列です。
例require "prism" errors = Prism.parse('"unterminated').errors p errors.size # => 1 p errors.first.class # => Prism::ParseError p errors.first.message # => "unterminated string meets end of file" p errors.first.level # => :syntax[SEE_ALSO] Prism::ParseResult#success?, Prism::ParseResult#warnings