diff options
author | Kevin Newton <kddnewton@gmail.com> | 2024-05-03 12:27:06 -0400 |
---|---|---|
committer | Kevin Newton <kddnewton@gmail.com> | 2024-05-03 13:11:09 -0400 |
commit | 461d6d441febd882d53fcf8cfef9635962e5b08c (patch) | |
tree | 27894dc2b76dcdf90c1684df60bafe210becdc2b /test/ruby | |
parent | 56672c8b187a425586c2f53834b5a88b0dbfcca2 (diff) |
[PRISM] Enable RubyVM tests for prism
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_rubyvm.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ruby/test_rubyvm.rb b/test/ruby/test_rubyvm.rb index d729aa5af8..053a914a8a 100644 --- a/test/ruby/test_rubyvm.rb +++ b/test/ruby/test_rubyvm.rb @@ -32,6 +32,7 @@ class TestRubyVM < Test::Unit::TestCase end def test_keep_script_lines + omit if compiling_with_prism? pend if ENV['RUBY_ISEQ_DUMP_DEBUG'] # TODO prev_conf = RubyVM.keep_script_lines @@ -68,4 +69,12 @@ class TestRubyVM < Test::Unit::TestCase ensure RubyVM.keep_script_lines = prev_conf end + + private + + # RubyVM.keep_script_lines does not mean anything in the context of prism, so + # we should omit tests that are looking for that functionality. + def compiling_with_prism? + RubyVM::InstructionSequence.compile("").to_a[4][:parser] == :prism + end end |