diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2024-01-25 11:32:31 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2024-01-25 12:14:22 -0500 |
| commit | e7262966c91c63511122153ea555c4cd420cd353 (patch) | |
| tree | 8d14c6ad6cf91b44bf6737a3f0094667186b9555 /test/ruby | |
| parent | d4cc77e7b6107b136e977e9b107b2d50aaa42314 (diff) | |
[PRISM] Fix indentation of test_ScopeNode
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_compile_prism.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/test/ruby/test_compile_prism.rb b/test/ruby/test_compile_prism.rb index 888e3d0a2a..6b8549df7f 100644 --- a/test/ruby/test_compile_prism.rb +++ b/test/ruby/test_compile_prism.rb @@ -2444,30 +2444,30 @@ end ############################################################################ def test_ScopeNode - assert_separately(%w[], "#{<<-'begin;'}\n#{<<-'end;'}") - begin; - def compare_eval(source) - ruby_eval = RubyVM::InstructionSequence.compile("module A; " + source + "; end").eval - prism_eval = RubyVM::InstructionSequence.compile_prism("module B; " + source + "; end").eval + assert_separately(%w[], <<~'RUBY') + def compare_eval(source) + ruby_eval = RubyVM::InstructionSequence.compile("module A; " + source + "; end").eval + prism_eval = RubyVM::InstructionSequence.compile_prism("module B; " + source + "; end").eval - assert_equal ruby_eval, prism_eval - end + assert_equal ruby_eval, prism_eval + end - def assert_prism_eval(source) - $VERBOSE, verbose_bak = nil, $VERBOSE + def assert_prism_eval(source) + $VERBOSE, verbose_bak = nil, $VERBOSE - begin - compare_eval(source) + begin + compare_eval(source) - # Test "popped" functionality - compare_eval("#{source}; 1") - ensure - $VERBOSE = verbose_bak - end - end - assert_prism_eval("a = 1; 1.times do; { a: }; end") - assert_prism_eval("a = 1; def foo(a); a; end") - end; + # Test "popped" functionality + compare_eval("#{source}; 1") + ensure + $VERBOSE = verbose_bak + end + end + + assert_prism_eval("a = 1; 1.times do; { a: }; end") + assert_prism_eval("a = 1; def foo(a); a; end") + RUBY end ############################################################################ |
