From cbaf61b276492532f4348f284322c88fcfe6efb5 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 20 Apr 2010 10:21:42 +0000 Subject: * test/ruby/test_system.rb (TestSystem#valid_syntax): return false on syntax error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_system.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/ruby/test_system.rb b/test/ruby/test_system.rb index 1819982250..fbed36ad57 100644 --- a/test/ruby/test_system.rb +++ b/test/ruby/test_system.rb @@ -10,6 +10,8 @@ class TestSystem < Test::Unit::TestCase } code.force_encoding("us-ascii") catch {|tag| eval(code, binding, fname, 0)} + rescue SyntaxError + false end def test_system -- cgit v1.2.3