mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_syntax.rb: assert_not_label
* test/ruby/test_syntax.rb (TestSyntax#assert_not_label): need to eval in the current binding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e489dc1ff4
commit
80ad3e2a43
1 changed files with 1 additions and 1 deletions
|
@ -330,7 +330,7 @@ eom
|
|||
def not_label(x) @result = x; @not_label ||= nil end
|
||||
def assert_not_label(expected, src, message = nil)
|
||||
@result = nil
|
||||
assert_valid_syntax(src, message)
|
||||
assert_nothing_raised(SyntaxError, message) {eval(src)}
|
||||
assert_equal(expected, @result, message)
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue