summaryrefslogtreecommitdiff
path: root/test
diff options
authorHiroshi SHIBATA <[email protected]>2023-12-25 17:34:06 +0900
committerHiroshi SHIBATA <[email protected]>2023-12-25 21:12:49 +0900
commitfa251d60aa9c6f271885a467a26249b29f291cd3 (patch)
tree859811df5e43f3329c16d53ca937c9171bddbf20 /test
parent12b69bf515111ecf4b550fe1e2c5ec81a6fcf43a (diff)
Revert "Revert all of commits after Prism 0.19.0 release"
This reverts commit d242e8416e99eaee4465e2681210ae8b7ecd6d34.
Diffstat (limited to 'test')
-rw-r--r--test/prism/errors_test.rb15
-rw-r--r--test/prism/fixtures/patterns.txt2
-rw-r--r--test/prism/location_test.rb2
-rw-r--r--test/prism/ruby_api_test.rb4
-rw-r--r--test/prism/snapshots/arrays.txt2
-rw-r--r--test/prism/snapshots/if.txt2
-rw-r--r--test/prism/snapshots/method_calls.txt20
-rw-r--r--test/prism/snapshots/patterns.txt24
-rw-r--r--test/prism/snapshots/rescue.txt2
-rw-r--r--test/prism/snapshots/seattlerb/assoc_label.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_249.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args.txt2
-rw-r--r--test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt2
-rw-r--r--test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt4
-rw-r--r--test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt2
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new.txt2
-rw-r--r--test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt2
-rw-r--r--test/prism/snapshots/seattlerb/difficult2_.txt2
-rw-r--r--test/prism/snapshots/seattlerb/multiline_hash_declaration.txt6
-rw-r--r--test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt2
-rw-r--r--test/prism/snapshots/seattlerb/return_call_assocs.txt10
-rw-r--r--test/prism/snapshots/seattlerb/yield_call_assocs.txt10
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/literal.txt12
-rw-r--r--test/prism/snapshots/unparser/corpus/literal/send.txt8
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs.txt4
-rw-r--r--test/prism/snapshots/whitequark/args_args_assocs_comma.txt2
-rw-r--r--test/prism/snapshots/whitequark/args_assocs.txt12
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_comma.txt2
-rw-r--r--test/prism/snapshots/whitequark/args_assocs_legacy.txt12
-rw-r--r--test/prism/snapshots/whitequark/bug_cmdarg.txt4
-rw-r--r--test/prism/snapshots/whitequark/keyword_argument_omission.txt2
-rw-r--r--test/prism/snapshots/whitequark/newline_in_hash_argument.txt4
-rw-r--r--test/prism/snapshots/whitequark/parser_bug_525.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_11380.txt2
-rw-r--r--test/prism/snapshots/whitequark/ruby_bug_12073.txt2
35 files changed, 107 insertions, 82 deletions
diff --git a/test/prism/errors_test.rb b/test/prism/errors_test.rb
index 51ac7bc5cf..57c0719aa7 100644
--- a/test/prism/errors_test.rb
+++ b/test/prism/errors_test.rb
@@ -1997,6 +1997,21 @@ module Prism
end
end
+ def test_command_call_in
+ source = <<~RUBY
+ foo 1 in a
+ a = foo 2 in b
+ RUBY
+ message1 = 'unexpected `in` keyword in arguments'
+ message2 = 'expected a newline or semicolon after the statement'
+ assert_errors expression(source), source, [
+ [message1, 9..10],
+ [message2, 8..8],
+ [message1, 24..25],
+ [message2, 23..23],
+ ]
+ end
+
def test_constant_assignment_in_method
source = 'def foo();A=1;end'
assert_errors expression(source), source, [
diff --git a/test/prism/fixtures/patterns.txt b/test/prism/fixtures/patterns.txt
index d73c8d025e..dcd6786d4b 100644
--- a/test/prism/fixtures/patterns.txt
+++ b/test/prism/fixtures/patterns.txt
@@ -51,7 +51,7 @@ foo => __LINE__ .. __LINE__
foo => __ENCODING__ .. __ENCODING__
foo => -> { bar } .. -> { bar }
-foo => ^bar
+bar = 1; foo => ^bar
foo => ^@bar
foo => ^@@bar
foo => ^$bar
diff --git a/test/prism/location_test.rb b/test/prism/location_test.rb
index 809c1bd8ae..e5b7546925 100644
--- a/test/prism/location_test.rb
+++ b/test/prism/location_test.rb
@@ -673,7 +673,7 @@ module Prism
end
def test_PinnedVariableNode
- assert_location(PinnedVariableNode, "foo in ^bar", 7...11, &:pattern)
+ assert_location(PinnedVariableNode, "bar = 1; foo in ^bar", 16...20, &:pattern)
end
def test_PostExecutionNode
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
diff --git a/test/prism/snapshots/arrays.txt b/test/prism/snapshots/arrays.txt
index d31cd7afc8..93f5c8fbc1 100644
--- a/test/prism/snapshots/arrays.txt
+++ b/test/prism/snapshots/arrays.txt
@@ -79,7 +79,7 @@
│ ├── flags: ∅
│ ├── elements: (length: 1)
│ │ └── @ KeywordHashNode (location: (5,1)-(5,12))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,1)-(5,12))
│ │ ├── key:
diff --git a/test/prism/snapshots/if.txt b/test/prism/snapshots/if.txt
index 6733e57bed..a5ffeac2c2 100644
--- a/test/prism/snapshots/if.txt
+++ b/test/prism/snapshots/if.txt
@@ -250,7 +250,7 @@
│ │ │ ├── flags: ∅
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ KeywordHashNode (location: (25,4)-(25,6))
- │ │ │ ├── flags: static_keys
+ │ │ │ ├── flags: symbol_keys
│ │ │ └── elements: (length: 1)
│ │ │ └── @ AssocNode (location: (25,4)-(25,6))
│ │ │ ├── key:
diff --git a/test/prism/snapshots/method_calls.txt b/test/prism/snapshots/method_calls.txt
index 65f0d1df16..f8de181d32 100644
--- a/test/prism/snapshots/method_calls.txt
+++ b/test/prism/snapshots/method_calls.txt
@@ -782,7 +782,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "a"
│ │ └── @ KeywordHashNode (location: (60,8)-(60,32))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 2)
│ │ ├── @ AssocNode (location: (60,8)-(60,22))
│ │ │ ├── key:
@@ -914,7 +914,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "a"
│ │ └── @ KeywordHashNode (location: (64,8)-(64,15))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (64,8)-(64,15))
│ │ ├── key:
@@ -983,7 +983,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (66,3)-(66,17))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (66,3)-(66,17))
│ │ ├── key:
@@ -1173,7 +1173,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (74,3)-(74,20))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (74,3)-(74,20))
│ │ ├── key:
@@ -1236,7 +1236,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "a"
│ │ └── @ KeywordHashNode (location: (82,0)-(82,5))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (82,0)-(82,5))
│ │ ├── key:
@@ -1287,7 +1287,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (87,4)-(87,21))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 2)
│ │ ├── @ AssocNode (location: (87,4)-(87,11))
│ │ │ ├── key:
@@ -1336,7 +1336,7 @@
│ │ ├── @ IntegerNode (location: (89,10)-(89,11))
│ │ │ └── flags: decimal
│ │ └── @ KeywordHashNode (location: (89,13)-(89,21))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (89,13)-(89,21))
│ │ ├── key:
@@ -1527,7 +1527,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (103,4)-(103,11))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (103,4)-(103,11))
│ │ ├── key:
@@ -1555,7 +1555,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (105,4)-(105,28))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (105,4)-(105,28))
│ │ ├── key:
@@ -1612,7 +1612,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (107,4)-(107,24))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (107,4)-(107,24))
│ │ ├── key:
diff --git a/test/prism/snapshots/patterns.txt b/test/prism/snapshots/patterns.txt
index aacdbb250e..13179be338 100644
--- a/test/prism/snapshots/patterns.txt
+++ b/test/prism/snapshots/patterns.txt
@@ -2,7 +2,7 @@
├── locals: [:bar, :baz, :qux, :b, :a, :foo, :x]
└── statements:
@ StatementsNode (location: (1,0)-(202,19))
- └── body: (length: 175)
+ └── body: (length: 176)
├── @ MatchRequiredNode (location: (1,0)-(1,10))
│ ├── value:
│ │ @ CallNode (location: (1,0)-(1,3))
@@ -1235,26 +1235,34 @@
│ │ │ └── depth: 1
│ │ └── operator_loc: (52,18)-(52,20) = ".."
│ └── operator_loc: (52,4)-(52,6) = "=>"
- ├── @ MatchRequiredNode (location: (54,0)-(54,11))
+ ├── @ LocalVariableWriteNode (location: (54,0)-(54,7))
+ │ ├── name: :bar
+ │ ├── depth: 0
+ │ ├── name_loc: (54,0)-(54,3) = "bar"
│ ├── value:
- │ │ @ CallNode (location: (54,0)-(54,3))
+ │ │ @ IntegerNode (location: (54,6)-(54,7))
+ │ │ └── flags: decimal
+ │ └── operator_loc: (54,4)-(54,5) = "="
+ ├── @ MatchRequiredNode (location: (54,9)-(54,20))
+ │ ├── value:
+ │ │ @ CallNode (location: (54,9)-(54,12))
│ │ ├── flags: variable_call
│ │ ├── receiver: ∅
│ │ ├── call_operator_loc: ∅
│ │ ├── name: :foo
- │ │ ├── message_loc: (54,0)-(54,3) = "foo"
+ │ │ ├── message_loc: (54,9)-(54,12) = "foo"
│ │ ├── opening_loc: ∅
│ │ ├── arguments: ∅
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ ├── pattern:
- │ │ @ PinnedVariableNode (location: (54,7)-(54,11))
+ │ │ @ PinnedVariableNode (location: (54,16)-(54,20))
│ │ ├── variable:
- │ │ │ @ LocalVariableReadNode (location: (54,8)-(54,11))
+ │ │ │ @ LocalVariableReadNode (location: (54,17)-(54,20))
│ │ │ ├── name: :bar
│ │ │ └── depth: 0
- │ │ └── operator_loc: (54,7)-(54,8) = "^"
- │ └── operator_loc: (54,4)-(54,6) = "=>"
+ │ │ └── operator_loc: (54,16)-(54,17) = "^"
+ │ └── operator_loc: (54,13)-(54,15) = "=>"
├── @ MatchRequiredNode (location: (55,0)-(55,12))
│ ├── value:
│ │ @ CallNode (location: (55,0)-(55,3))
diff --git a/test/prism/snapshots/rescue.txt b/test/prism/snapshots/rescue.txt
index 3f9dc426a2..12607e8be2 100644
--- a/test/prism/snapshots/rescue.txt
+++ b/test/prism/snapshots/rescue.txt
@@ -343,7 +343,7 @@
│ │ │ ├── flags: ∅
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ KeywordHashNode (location: (29,4)-(29,6))
- │ │ │ ├── flags: static_keys
+ │ │ │ ├── flags: symbol_keys
│ │ │ └── elements: (length: 1)
│ │ │ └── @ AssocNode (location: (29,4)-(29,6))
│ │ │ ├── key:
diff --git a/test/prism/snapshots/seattlerb/assoc_label.txt b/test/prism/snapshots/seattlerb/assoc_label.txt
index 1d65eef3f9..c8526358f5 100644
--- a/test/prism/snapshots/seattlerb/assoc_label.txt
+++ b/test/prism/snapshots/seattlerb/assoc_label.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,2)-(1,5))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,2)-(1,5))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/bug_249.txt b/test/prism/snapshots/seattlerb/bug_249.txt
index 4c684f32dc..c293491429 100644
--- a/test/prism/snapshots/seattlerb/bug_249.txt
+++ b/test/prism/snapshots/seattlerb/bug_249.txt
@@ -66,7 +66,7 @@
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── @ KeywordHashNode (location: (4,11)-(4,28))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (4,11)-(4,28))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args.txt b/test/prism/snapshots/seattlerb/bug_hash_args.txt
index cea1fc8db0..7900bbe0d1 100644
--- a/test/prism/snapshots/seattlerb/bug_hash_args.txt
+++ b/test/prism/snapshots/seattlerb/bug_hash_args.txt
@@ -21,7 +21,7 @@
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "bar"
│ └── @ KeywordHashNode (location: (1,10)-(1,18))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,10)-(1,18))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
index e4c2a10f2e..2b2b246226 100644
--- a/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
+++ b/test/prism/snapshots/seattlerb/bug_hash_args_trailing_comma.txt
@@ -21,7 +21,7 @@
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "bar"
│ └── @ KeywordHashNode (location: (1,10)-(1,18))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,10)-(1,18))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
index 958231a21a..9426531d5c 100644
--- a/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
+++ b/test/prism/snapshots/seattlerb/call_args_assoc_quoted.txt
@@ -57,7 +57,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (3,2)-(3,8))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (3,2)-(3,8))
│ │ ├── key:
@@ -85,7 +85,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (5,2)-(5,8))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (5,2)-(5,8))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
index f8cde2f6a9..f572729b8a 100644
--- a/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
+++ b/test/prism/snapshots/seattlerb/call_array_lit_inline_hash.txt
@@ -24,7 +24,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── unescaped: "b"
│ │ └── @ KeywordHashNode (location: (1,7)-(1,14))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,7)-(1,14))
│ │ ├── key:
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new.txt b/test/prism/snapshots/seattlerb/call_assoc_new.txt
index 6d12125260..decf68ae6e 100644
--- a/test/prism/snapshots/seattlerb/call_assoc_new.txt
+++ b/test/prism/snapshots/seattlerb/call_assoc_new.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,2)-(1,5))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,2)-(1,5))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
index 1c079f9d1d..c9e0ff9693 100644
--- a/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
+++ b/test/prism/snapshots/seattlerb/call_assoc_new_if_multiline.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,2)-(5,3))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,2)-(5,3))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/difficult2_.txt b/test/prism/snapshots/seattlerb/difficult2_.txt
index a81b0ce458..72cac371f7 100644
--- a/test/prism/snapshots/seattlerb/difficult2_.txt
+++ b/test/prism/snapshots/seattlerb/difficult2_.txt
@@ -53,7 +53,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (2,2)-(2,6))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (2,2)-(2,6))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
index efa6fa242d..f377bda17c 100644
--- a/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
+++ b/test/prism/snapshots/seattlerb/multiline_hash_declaration.txt
@@ -15,7 +15,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,2)-(3,1))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,2)-(3,1))
│ │ ├── key:
@@ -45,7 +45,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (5,2)-(6,1))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,2)-(6,1))
│ │ ├── key:
@@ -75,7 +75,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (8,2)-(8,11))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (8,2)-(8,11))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
index 59bd8f0220..8730eb1911 100644
--- a/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
+++ b/test/prism/snapshots/seattlerb/quoted_symbol_hash_arg.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,5)-(1,12))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,5)-(1,12))
│ ├── key:
diff --git a/test/prism/snapshots/seattlerb/return_call_assocs.txt b/test/prism/snapshots/seattlerb/return_call_assocs.txt
index 8baf6c4c7e..98b7943bac 100644
--- a/test/prism/snapshots/seattlerb/return_call_assocs.txt
+++ b/test/prism/snapshots/seattlerb/return_call_assocs.txt
@@ -12,7 +12,7 @@
│ ├── @ IntegerNode (location: (1,7)-(1,8))
│ │ └── flags: decimal
│ └── @ KeywordHashNode (location: (1,10)-(1,17))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,10)-(1,17))
│ ├── key:
@@ -35,7 +35,7 @@
│ ├── @ IntegerNode (location: (3,7)-(3,8))
│ │ └── flags: decimal
│ └── @ KeywordHashNode (location: (3,10)-(3,26))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 2)
│ ├── @ AssocNode (location: (3,10)-(3,17))
│ │ ├── key:
@@ -79,7 +79,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (5,9)-(5,14))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,9)-(5,14))
│ │ ├── key:
@@ -113,7 +113,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (7,9)-(7,12))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (7,9)-(7,12))
│ │ ├── key:
@@ -147,7 +147,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (9,9)-(9,12))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (9,9)-(9,12))
│ │ ├── key:
diff --git a/test/prism/snapshots/seattlerb/yield_call_assocs.txt b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
index 82d1765f21..95d64eaaef 100644
--- a/test/prism/snapshots/seattlerb/yield_call_assocs.txt
+++ b/test/prism/snapshots/seattlerb/yield_call_assocs.txt
@@ -13,7 +13,7 @@
│ │ ├── @ IntegerNode (location: (1,6)-(1,7))
│ │ │ └── flags: decimal
│ │ └── @ KeywordHashNode (location: (1,9)-(1,16))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,9)-(1,16))
│ │ ├── key:
@@ -38,7 +38,7 @@
│ │ ├── @ IntegerNode (location: (3,6)-(3,7))
│ │ │ └── flags: decimal
│ │ └── @ KeywordHashNode (location: (3,9)-(3,25))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 2)
│ │ ├── @ AssocNode (location: (3,9)-(3,16))
│ │ │ ├── key:
@@ -84,7 +84,7 @@
│ │ │ ├── flags: ∅
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ KeywordHashNode (location: (5,8)-(5,13))
- │ │ │ ├── flags: static_keys
+ │ │ │ ├── flags: symbol_keys
│ │ │ └── elements: (length: 1)
│ │ │ └── @ AssocNode (location: (5,8)-(5,13))
│ │ │ ├── key:
@@ -120,7 +120,7 @@
│ │ │ ├── flags: ∅
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ KeywordHashNode (location: (7,8)-(7,11))
- │ │ │ ├── flags: static_keys
+ │ │ │ ├── flags: symbol_keys
│ │ │ └── elements: (length: 1)
│ │ │ └── @ AssocNode (location: (7,8)-(7,11))
│ │ │ ├── key:
@@ -156,7 +156,7 @@
│ │ │ ├── flags: ∅
│ │ │ └── arguments: (length: 1)
│ │ │ └── @ KeywordHashNode (location: (9,8)-(9,11))
- │ │ │ ├── flags: static_keys
+ │ │ │ ├── flags: symbol_keys
│ │ │ └── elements: (length: 1)
│ │ │ └── @ AssocNode (location: (9,8)-(9,11))
│ │ │ ├── key:
diff --git a/test/prism/snapshots/unparser/corpus/literal/literal.txt b/test/prism/snapshots/unparser/corpus/literal/literal.txt
index 21ae9f670b..a26b925196 100644
--- a/test/prism/snapshots/unparser/corpus/literal/literal.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/literal.txt
@@ -9,7 +9,7 @@
│ │ ├── @ AssocNode (location: (1,2)-(1,21))
│ │ │ ├── key:
│ │ │ │ @ StringNode (location: (1,2)-(1,7))
- │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── flags: frozen
│ │ │ │ ├── opening_loc: (1,2)-(1,3) = "\""
│ │ │ │ ├── content_loc: (1,3)-(1,6) = "foo"
│ │ │ │ ├── closing_loc: (1,6)-(1,7) = "\""
@@ -39,7 +39,7 @@
│ │ └── @ AssocNode (location: (1,23)-(1,36))
│ │ ├── key:
│ │ │ @ StringNode (location: (1,23)-(1,28))
- │ │ │ ├── flags: ∅
+ │ │ │ ├── flags: frozen
│ │ │ ├── opening_loc: (1,23)-(1,24) = "\""
│ │ │ ├── content_loc: (1,24)-(1,27) = "bar"
│ │ │ ├── closing_loc: (1,27)-(1,28) = "\""
@@ -59,7 +59,7 @@
│ │ ├── @ AssocNode (location: (4,2)-(4,14))
│ │ │ ├── key:
│ │ │ │ @ StringNode (location: (4,2)-(4,7))
- │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── flags: frozen
│ │ │ │ ├── opening_loc: (4,2)-(4,3) = "\""
│ │ │ │ ├── content_loc: (4,3)-(4,6) = "foo"
│ │ │ │ ├── closing_loc: (4,6)-(4,7) = "\""
@@ -75,7 +75,7 @@
│ │ └── @ AssocNode (location: (4,16)-(4,29))
│ │ ├── key:
│ │ │ @ StringNode (location: (4,16)-(4,21))
- │ │ │ ├── flags: ∅
+ │ │ │ ├── flags: frozen
│ │ │ ├── opening_loc: (4,16)-(4,17) = "\""
│ │ │ ├── content_loc: (4,17)-(4,20) = "bar"
│ │ │ ├── closing_loc: (4,20)-(4,21) = "\""
@@ -184,7 +184,7 @@
│ │ ├── @ AssocNode (location: (10,2)-(10,21))
│ │ │ ├── key:
│ │ │ │ @ StringNode (location: (10,2)-(10,7))
- │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── flags: frozen
│ │ │ │ ├── opening_loc: (10,2)-(10,3) = "\""
│ │ │ │ ├── content_loc: (10,3)-(10,6) = "foo"
│ │ │ │ ├── closing_loc: (10,6)-(10,7) = "\""
@@ -231,7 +231,7 @@
│ │ ├── @ AssocNode (location: (13,2)-(13,14))
│ │ │ ├── key:
│ │ │ │ @ StringNode (location: (13,2)-(13,7))
- │ │ │ │ ├── flags: ∅
+ │ │ │ │ ├── flags: frozen
│ │ │ │ ├── opening_loc: (13,2)-(13,3) = "\""
│ │ │ │ ├── content_loc: (13,3)-(13,6) = "foo"
│ │ │ │ ├── closing_loc: (13,6)-(13,7) = "\""
diff --git a/test/prism/snapshots/unparser/corpus/literal/send.txt b/test/prism/snapshots/unparser/corpus/literal/send.txt
index a96937e87e..edfd0cc6ae 100644
--- a/test/prism/snapshots/unparser/corpus/literal/send.txt
+++ b/test/prism/snapshots/unparser/corpus/literal/send.txt
@@ -1249,7 +1249,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (63,8)-(63,16))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (63,8)-(63,16))
│ │ ├── key:
@@ -1310,7 +1310,7 @@
│ │ └── @ AssocNode (location: (64,13)-(64,25))
│ │ ├── key:
│ │ │ @ StringNode (location: (64,13)-(64,18))
- │ │ │ ├── flags: ∅
+ │ │ │ ├── flags: frozen
│ │ │ ├── opening_loc: (64,13)-(64,14) = "\""
│ │ │ ├── content_loc: (64,14)-(64,17) = "baz"
│ │ │ ├── closing_loc: (64,17)-(64,18) = "\""
@@ -1569,7 +1569,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (70,4)-(70,8))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (70,4)-(70,8))
│ │ ├── key:
@@ -1615,7 +1615,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (71,6)-(71,10))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (71,6)-(71,10))
│ │ ├── key:
diff --git a/test/prism/snapshots/whitequark/args_args_assocs.txt b/test/prism/snapshots/whitequark/args_args_assocs.txt
index d5c0d7d136..3d467e39a5 100644
--- a/test/prism/snapshots/whitequark/args_args_assocs.txt
+++ b/test/prism/snapshots/whitequark/args_args_assocs.txt
@@ -25,7 +25,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ └── @ KeywordHashNode (location: (1,9)-(1,18))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,9)-(1,18))
│ │ ├── key:
@@ -63,7 +63,7 @@
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── @ KeywordHashNode (location: (3,9)-(3,18))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (3,9)-(3,18))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/args_args_assocs_comma.txt b/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
index 2aa1644610..7b74a1886c 100644
--- a/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
+++ b/test/prism/snapshots/whitequark/args_args_assocs_comma.txt
@@ -35,7 +35,7 @@
│ │ ├── closing_loc: ∅
│ │ └── block: ∅
│ └── @ KeywordHashNode (location: (1,9)-(1,18))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,9)-(1,18))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/args_assocs.txt b/test/prism/snapshots/whitequark/args_assocs.txt
index bf51dda187..e4acaca435 100644
--- a/test/prism/snapshots/whitequark/args_assocs.txt
+++ b/test/prism/snapshots/whitequark/args_assocs.txt
@@ -15,7 +15,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,4)-(1,13))
│ │ ├── key:
@@ -43,7 +43,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (3,4)-(3,13))
│ │ ├── key:
@@ -95,7 +95,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,14)-(5,21))
│ │ ├── key:
@@ -124,7 +124,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (7,5)-(7,14))
│ │ ├── key:
@@ -148,7 +148,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (9,6)-(9,16))
│ │ ├── key:
@@ -172,7 +172,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (11,6)-(11,16))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (11,6)-(11,16))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/args_assocs_comma.txt b/test/prism/snapshots/whitequark/args_assocs_comma.txt
index b98aa39cb7..0ced5c7bc6 100644
--- a/test/prism/snapshots/whitequark/args_assocs_comma.txt
+++ b/test/prism/snapshots/whitequark/args_assocs_comma.txt
@@ -25,7 +25,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,4)-(1,13))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,4)-(1,13))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/args_assocs_legacy.txt b/test/prism/snapshots/whitequark/args_assocs_legacy.txt
index bf51dda187..e4acaca435 100644
--- a/test/prism/snapshots/whitequark/args_assocs_legacy.txt
+++ b/test/prism/snapshots/whitequark/args_assocs_legacy.txt
@@ -15,7 +15,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,4)-(1,13))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,4)-(1,13))
│ │ ├── key:
@@ -43,7 +43,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (3,4)-(3,13))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (3,4)-(3,13))
│ │ ├── key:
@@ -95,7 +95,7 @@
│ │ │ ├── closing_loc: ∅
│ │ │ └── block: ∅
│ │ └── @ KeywordHashNode (location: (5,14)-(5,21))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (5,14)-(5,21))
│ │ ├── key:
@@ -124,7 +124,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (7,5)-(7,14))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (7,5)-(7,14))
│ │ ├── key:
@@ -148,7 +148,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (9,6)-(9,16))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (9,6)-(9,16))
│ │ ├── key:
@@ -172,7 +172,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (11,6)-(11,16))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (11,6)-(11,16))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/bug_cmdarg.txt b/test/prism/snapshots/whitequark/bug_cmdarg.txt
index 6779d11735..428d061ee4 100644
--- a/test/prism/snapshots/whitequark/bug_cmdarg.txt
+++ b/test/prism/snapshots/whitequark/bug_cmdarg.txt
@@ -15,7 +15,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,7)-(1,15))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,7)-(1,15))
│ │ ├── key:
@@ -65,7 +65,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (5,2)-(5,26))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (5,2)-(5,26))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/keyword_argument_omission.txt b/test/prism/snapshots/whitequark/keyword_argument_omission.txt
index 3ff3f9a176..afcfd87c49 100644
--- a/test/prism/snapshots/whitequark/keyword_argument_omission.txt
+++ b/test/prism/snapshots/whitequark/keyword_argument_omission.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,4)-(1,10))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 2)
│ ├── @ AssocNode (location: (1,4)-(1,6))
│ │ ├── key:
diff --git a/test/prism/snapshots/whitequark/newline_in_hash_argument.txt b/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
index 0e036fbd85..5f5c1e406c 100644
--- a/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
+++ b/test/prism/snapshots/whitequark/newline_in_hash_argument.txt
@@ -93,7 +93,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (10,8)-(11,1))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (10,8)-(11,1))
│ │ ├── key:
@@ -131,7 +131,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (13,8)-(14,1))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (13,8)-(14,1))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/parser_bug_525.txt b/test/prism/snapshots/whitequark/parser_bug_525.txt
index 087cc76e1b..7289bdf81b 100644
--- a/test/prism/snapshots/whitequark/parser_bug_525.txt
+++ b/test/prism/snapshots/whitequark/parser_bug_525.txt
@@ -15,7 +15,7 @@
│ ├── flags: ∅
│ └── arguments: (length: 1)
│ └── @ KeywordHashNode (location: (1,3)-(1,11))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,3)-(1,11))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/ruby_bug_11380.txt b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
index cd2939f8bb..7ab13b891e 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_11380.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_11380.txt
@@ -31,7 +31,7 @@
│ │ ├── closing_loc: ∅
│ │ └── unescaped: "hello"
│ └── @ KeywordHashNode (location: (1,17)-(1,21))
- │ ├── flags: static_keys
+ │ ├── flags: symbol_keys
│ └── elements: (length: 1)
│ └── @ AssocNode (location: (1,17)-(1,21))
│ ├── key:
diff --git a/test/prism/snapshots/whitequark/ruby_bug_12073.txt b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
index 521df7a013..27f2838bce 100644
--- a/test/prism/snapshots/whitequark/ruby_bug_12073.txt
+++ b/test/prism/snapshots/whitequark/ruby_bug_12073.txt
@@ -23,7 +23,7 @@
│ │ ├── flags: ∅
│ │ └── arguments: (length: 1)
│ │ └── @ KeywordHashNode (location: (1,9)-(1,13))
- │ │ ├── flags: static_keys
+ │ │ ├── flags: symbol_keys
│ │ └── elements: (length: 1)
│ │ └── @ AssocNode (location: (1,9)-(1,13))
│ │ ├── key: