From f38814564b1c8d9394ae4568fb0dfd2bbbfe3440 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Fri, 15 Dec 2023 10:07:55 -0500 Subject: [ruby/prism] Fix eval parsing depth https://github.com/ruby/prism/commit/89bf7a4948 --- test/prism/ruby_api_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') 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 -- cgit v1.2.3