Koichi ITO 88954a0e9a [ruby/prism] Tweak inspect representation of Prism::Location
This PR tweaks inspect representation of `Prism::Location`.

## Before

During debugging, the meaning of `@location=https://github.com/ruby/prism/commit/21474836481` was unclear:

```console
$ ruby -Ilib -rprism -e 'p Prism.lex("puts :hi").value.map(&:first)[1]'
#<Prism::Token:0x000000010cd74e40 @source=#<Prism::ASCIISource:0x000000010cb5f808 @source="puts :hi", @start_line=1, @offsets=[0]>,
@type=:SYMBOL_BEGIN, @value=":", @location=https://github.com/ruby/prism/commit/21474836481>
```

## After

This PR clarifies the contents of the location object, aligning with what I think user expects:

```console
$ ruby -Ilib -rprism -e 'p Prism.lex("puts :hi").value.map(&:first)[1]'
#<Prism::Token:0x000000010e174d50 @source=#<Prism::ASCIISource:0x000000010df5efe8 @source="puts :hi", @start_line=1, @offsets=[0]>,
@type=:SYMBOL_BEGIN, @value=":", @location=#<Prism::Location @start_offset=5 @length=1 start_line=1>>
```

Although it is uncertain whether Prism will accept this change in the inspect representation, it is submitted here as a suggestion.

https://github.com/ruby/prism/commit/e7421ce1c5
2024-08-14 16:28:43 +00:00
..
2024-08-13 09:10:15 -04:00
2024-08-13 20:56:35 +00:00
2024-05-24 17:19:38 +00:00