summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_iseq.rb11
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