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

Relaxed tests for CPDEBUG mode

This commit is contained in:
Nobuyoshi Nakada 2019-10-23 01:05:14 +09:00
parent 1a80ee4573
commit 801a11d0ab
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 6 additions and 4 deletions

View file

@ -190,7 +190,8 @@ assert_equal %q{[10, main]}, %q{
}
%w[break next redo].each do |keyword|
assert_match %r"Can't escape from eval with #{keyword}\z", %{
assert_match %r"Can't escape from eval with #{keyword}\b", %{
STDERR.reopen(STDOUT)
begin
eval "0 rescue #{keyword}"
rescue SyntaxError => e

View file

@ -146,15 +146,16 @@ assert_equal %q{131}, %q{
end
}
}
assert_equal %q{ok}, %q{
assert_match %r{Invalid retry}, %q{
STDERR.reopen(STDOUT)
begin
eval %q{
1.times{
retry
}
}
rescue SyntaxError
:ok
rescue SyntaxError => e
e.message
end
}
assert_equal %q{3}, %q{