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

instance method Prism::Location#slice

slice -> StringRuby 3.3 から[permalink][rdoc][edit]

範囲に対応するソースコードの文字列を返します。