Skip to content

Commit

Permalink
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/mri/lib/test/unit/assertions.rb
Original file line number Diff line number Diff line change
@@ -475,7 +475,11 @@ def check_syntax(src, filename, line)
if defined? RubyVM::InstructionSequence
RubyVM::InstructionSequence.compile(src, filename, filename, line)
else
eval src, binding, filename, line
src = <<-WRAPPED
#{src}
BEGIN { throw :tag, :ok }
WRAPPED
assert_equal(:ok, catch(:tag) { eval(src, binding, filename, line)})
end
end

0 comments on commit 6baf5f4

Please sign in to comment.