summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-12-15 10:07:55 -0500
committergit <svn-admin@ruby-lang.org>2023-12-15 15:19:50 +0000
commitf38814564b1c8d9394ae4568fb0dfd2bbbfe3440 (patch)
tree3981602be866059faed755b2b3759482fac7581a /test
parentfe9b42f024eb3724b0853c914916ea7a97fd30a6 (diff)
[ruby/prism] Fix eval parsing depth
https://github.com/ruby/prism/commit/89bf7a4948
Diffstat (limited to 'test')
-rw-r--r--test/prism/ruby_api_test.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/prism/ruby_api_test.rb b/test/prism/ruby_api_test.rb
index 3bf89f3339..7bb80b481a 100644
--- a/test/prism/ruby_api_test.rb
+++ b/test/prism/ruby_api_test.rb
@@ -42,7 +42,9 @@ module Prism
assert_kind_of Prism::CallNode, Prism.parse("foo").value.statements.body[0]
assert_kind_of Prism::LocalVariableReadNode, Prism.parse("foo", scopes: [[:foo]]).value.statements.body[0]
- assert_equal 2, Prism.parse("foo", scopes: [[:foo], []]).value.statements.body[0].depth
+ assert_equal 1, Prism.parse("foo", scopes: [[:foo], []]).value.statements.body[0].depth
+
+ assert_equal [:foo], Prism.parse("foo", scopes: [[:foo]]).value.locals
end
def test_literal_value_method