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

Show the code in syntax assertions

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2019-01-30 11:58:07 +00:00
parent ea88f7ddf9
commit 15f8fb34fa

View file

@ -510,7 +510,13 @@ EOT
else
line = 1
end
yield(code, fname, line, mesg)
yield(code, fname, line, message(mesg) {
if code.end_with?("\n")
"```\n#{code}```\n"
else
"```\n#{code}\n```\n""no-newline"
end
})
ensure
$VERBOSE = verbose
end