summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-08-20 16:18:36 +0900
committerYusuke Endoh <mame@ruby-lang.org>2021-08-20 16:18:36 +0900
commitcad83fa3c4491153df0561b06bb261e25a831d0f (patch)
treebfd9978fbf6d6971c34cfa40bf2b3ce673377ed3 /test
parent4c93c124c29465e49343b47c935be99ad67a7d83 (diff)
ast.c: Rename "save_script_lines" to "keep_script_lines"
... as per ko1's preference. He is preparing to extend this feature to ISeq for his new debugger. He prefers "keep" to "save" for this wording. This API is internal and not included in any released version, so I change it in advance.
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_ast.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ruby/test_ast.rb b/test/ruby/test_ast.rb
index 3b4cbc7dee..3af67b1495 100644
--- a/test/ruby/test_ast.rb
+++ b/test/ruby/test_ast.rb
@@ -393,8 +393,8 @@ class TestAst < Test::Unit::TestCase
assert_equal(:a, args.children[rest])
end
- def test_save_script_lines_for_parse
- node = RubyVM::AbstractSyntaxTree.parse(<<~END, save_script_lines: true)
+ def test_keep_script_lines_for_parse
+ node = RubyVM::AbstractSyntaxTree.parse(<<~END, keep_script_lines: true)
1.times do
2.times do
end
@@ -432,14 +432,14 @@ dummy
assert_equal(expected, node.children.last.children.last.children.last.source)
end
- def test_save_script_lines_for_of
+ def test_keep_script_lines_for_of
proc = Proc.new { 1 + 2 }
method = self.method(__method__)
- node_proc = RubyVM::AbstractSyntaxTree.of(proc, save_script_lines: true)
- node_method = RubyVM::AbstractSyntaxTree.of(method, save_script_lines: true)
+ node_proc = RubyVM::AbstractSyntaxTree.of(proc, keep_script_lines: true)
+ node_method = RubyVM::AbstractSyntaxTree.of(method, keep_script_lines: true)
assert_equal("{ 1 + 2 }", node_proc.source)
- assert_equal("def test_save_script_lines_for_of\n", node_method.source.lines.first)
+ assert_equal("def test_keep_script_lines_for_of\n", node_method.source.lines.first)
end
end