Ruby 3.4 リファレンスマニュアル

instance method Psych::SyntaxError#line

line -> IntegerRuby 1.9.3 から[permalink][rdoc][edit]

エラーが生じた行番号を返します。