summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorMatt Valentine-House <matt@eightbitraptor.com>2024-12-17 12:13:20 +0000
committerMatt Valentine-House <matt@eightbitraptor.com>2024-12-17 15:13:53 +0000
commit86cf18e01e8be1db6194b7cb27357150998d9056 (patch)
treeb6a1a49dc2181f1a716c1d95a1082826ed8ebec8 /test/ruby
parentc25dd4ee472e1516be64b9b2f0a9e222ef7532d6 (diff)
[PRISM] Recurse use_deconstructed_cache in Alternation Nodes
This fixes the behavioural difference between Prism and parse.y when evaluating the following code ```ruby 1 in [1 | [1]] ``` Fixes [Bug #20956]
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12370
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_compile_prism.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb
index 92c1304e9b..25f098f562 100644
--- a/test/ruby/test_compile_prism.rb
+++ b/test/ruby/test_compile_prism.rb
@@ -2485,6 +2485,9 @@ end
assert_prism_eval("5 in foo")
assert_prism_eval("1 in 2")
+
+ # Bug: https://bugs.ruby-lang.org/issues/20956
+ assert_prism_eval("1 in [1 | [1]]")
end
def test_MatchRequiredNode