Skip to content

Commit 8038c3d

Browse files
committed
"save_script_lines" was renamed to "keep_script_lines"
ruby/ruby@cad83fa
1 parent 7a8f0b4 commit 8038c3d

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ test.rb:2:in `extract_value': undefined method `[]' for nil:NilClass (NoMethodEr
5656
*Note: This API is experimental, may change in future.*
5757

5858
You can use the `ErrorHighlight.spot` method to get the spnippet data.
59-
Note that the argument must be a RubyVM::AbstractSyntaxTree::Node object that is created with `save_script_lines: true` option (which is available since Ruby 3.1).
59+
Note that the argument must be a RubyVM::AbstractSyntaxTree::Node object that is created with `keep_script_lines: true` option (which is available since Ruby 3.1).
6060

6161
```ruby
6262
class Dummy
6363
def test(_dummy_arg)
64-
node = RubyVM::AbstractSyntaxTree.of(caller_locations.first, save_script_lines: true)
64+
node = RubyVM::AbstractSyntaxTree.of(caller_locations.first, keep_script_lines: true)
6565
ErrorHighlight.spot(node)
6666
end
6767
end

lib/error_highlight/core_ext.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def to_s
1616

1717
loc = locs.first
1818
begin
19-
node = RubyVM::AbstractSyntaxTree.of(loc, save_script_lines: true)
19+
node = RubyVM::AbstractSyntaxTree.of(loc, keep_script_lines: true)
2020
opts = {}
2121

2222
case self

0 commit comments

Comments
 (0)