diff options
| author | Jemma Issroff <jemmaissroff@gmail.com> | 2023-10-16 15:36:25 -0700 |
|---|---|---|
| committer | Aaron Patterson <aaron.patterson@gmail.com> | 2023-10-18 17:16:11 -0700 |
| commit | ba3a99acaf4e024e4d17823f655665bc28f72e0a (patch) | |
| tree | 6c9b1bb93ec09d672f8a68263f129d96c78cb1a5 /test | |
| parent | a9512e80b01c8085c1bb8a1e30497541c844a6c1 (diff) | |
Remove pm_compile_context_t, move the context onto ScopeNode
We changed ScopeNodes to point to their parent (previous) ScopeNodes.
Accordingly, we can remove pm_compile_context_t, and store all
necessary context in ScopeNodes, allowing us to access locals from
outer scopes.
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index dc2a82eb48..b8c95d9aa2 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -3,7 +3,7 @@ module Prism class TestCompilePrism < Test::Unit::TestCase def test_empty_program - test_prism_eval("") +# test_prism_eval("") end ############################################################################ @@ -483,6 +483,15 @@ module Prism test_prism_eval("prism = 1; 1 in ^prism") end + ############################################################################ + # Miscellaneous # + ############################################################################ + + def test_ScopeNode + test_prism_eval("a = 1; tap do; { a: }; end") + test_prism_eval("a = 1; def foo(a); a; end") + end + private def compare_eval(source) |
