1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2010-04-20 10:21:42 +00:00
parent 2b222b9b17
commit cbaf61b276

View file

@ -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