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:
parent
2b222b9b17
commit
cbaf61b276
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,8 @@ class TestSystem < Test::Unit::TestCase
|
||||||
}
|
}
|
||||||
code.force_encoding("us-ascii")
|
code.force_encoding("us-ascii")
|
||||||
catch {|tag| eval(code, binding, fname, 0)}
|
catch {|tag| eval(code, binding, fname, 0)}
|
||||||
|
rescue SyntaxError
|
||||||
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_system
|
def test_system
|
||||||
|
|
Loading…
Reference in a new issue