summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-20 10:21:42 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-20 10:21:42 +0000
commitcbaf61b276492532f4348f284322c88fcfe6efb5 (patch)
treec033e00bcaaac02624f2cd09c7609a1b1b3c1967 /test
parent2b222b9b1773d8ae574c4d39b312b83615ecb700 (diff)
* 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
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_system.rb2
1 files changed, 2 insertions, 0 deletions
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