diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-01-11 13:51:32 -0500 |
|---|---|---|
| committer | Kevin Newton <kddnewton@gmail.com> | 2024-01-11 14:59:37 -0500 |
| commit | 44d0c5ae3f1e1586f9dac07dd19f65b80fb8e2b4 (patch) | |
| tree | a2a1d2211d159388dfe4da42e72f6b76f7fddfdc /test/ruby | |
| parent | 45dd8edf82d2648fed51b0e65f6fc1cf4473038d (diff) | |
[PRISM] Raise syntax errors when found
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_iseq.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/ruby/test_iseq.rb b/test/ruby/test_iseq.rb index b0896511d8..f5c0b82057 100644 --- a/test/ruby/test_iseq.rb +++ b/test/ruby/test_iseq.rb @@ -801,12 +801,15 @@ class TestISeq < Test::Unit::TestCase def test_compile_prism_with_file Tempfile.create(%w"test_iseq .rb") do |f| - f.puts "name = 'Prism'; puts 'hello" + f.puts "name = 'Prism'; puts 'hello'" f.close - assert_nothing_raised(SyntaxError) { - RubyVM::InstructionSequence.compile_prism(f.path) - } + assert_nothing_raised(TypeError) do + begin + RubyVM::InstructionSequence.compile_prism(f.path) + rescue SyntaxError + end + end end end end |
