| 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
|
|
https://github.com/ruby/prism/commit/4f3a3e3ec1
|
|
https://github.com/ruby/prism/commit/13fa262669
|
|
https://github.com/ruby/prism/commit/f0aa8ad93b
|
|
https://github.com/ruby/prism/commit/99e81619de
|