Age | Commit message (Collapse) | Author |
|
Ruby allows for 0 or negative line start, this is often used
with `eval` calls to get a correct offset when prefixing a snippet.
e.g.
```ruby
caller = caller_locations(1, 1).first
class_eval <<~RUBY, caller.path, caller.line - 2
# frozen_string_literal: true
def some_method
#{caller_provided_code_snippet}
end
RUBY
```
https://github.com/ruby/prism/commit/0d14ed1452
|
|
Line numbers may be negative, so we need to introduce signed varint,
so renaming unsigned ones first avoid confusion.
https://github.com/ruby/prism/commit/90d862361e
|
|
https://github.com/ruby/prism/commit/bec5ca37a0
|
|
https://github.com/ruby/prism/commit/6d8358c083
|
|
https://github.com/ruby/prism/commit/7c9cf63d4c
|
|
https://github.com/ruby/prism/commit/ba33607034
|
|
|
|
|