зеркало из https://github.com/github/ruby.git
Pass keyword options in assert_syntax_error
This commit is contained in:
Родитель
221ca0f828
Коммит
fb54574393
|
@ -238,8 +238,8 @@ EOT
|
||||||
# compatibility with test-unit
|
# compatibility with test-unit
|
||||||
alias pend skip
|
alias pend skip
|
||||||
|
|
||||||
def assert_syntax_error(code, error, *args)
|
def assert_syntax_error(code, error, *args, **opt)
|
||||||
prepare_syntax_check(code, *args) do |src, fname, line, mesg|
|
prepare_syntax_check(code, *args, **opt) do |src, fname, line, mesg|
|
||||||
yield if defined?(yield)
|
yield if defined?(yield)
|
||||||
e = assert_raise(SyntaxError, mesg) do
|
e = assert_raise(SyntaxError, mesg) do
|
||||||
syntax_check(src, fname, line)
|
syntax_check(src, fname, line)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче