first_lineno -> IntegerRuby 3.4 から[permalink][rdoc][edit]() → Integer-
ソースコード中で、この位置情報が指す範囲が始まる行番号を返します。
行番号は1-originです。
loc = RubyVM::AbstractSyntaxTree.parse('1 + 2').locations.first p loc.first_lineno # => 1
first_lineno -> IntegerRuby 3.4 から[permalink][rdoc][edit]() → Integerソースコード中で、この位置情報が指す範囲が始まる行番号を返します。
行番号は1-originです。
loc = RubyVM::AbstractSyntaxTree.parse('1 + 2').locations.first
p loc.first_lineno # => 1