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

Removed duplicate highlighting

This commit is contained in:
Nobuyoshi Nakada 2019-07-15 19:31:48 +09:00
parent b452c03a14
commit 0c6c937904
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 3 additions and 2 deletions

View file

@ -144,8 +144,6 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
write_warn(str, ": ");
}
if (highlight) write_warn(str, bold);
if (!NIL_P(emesg)) {
einfo = RSTRING_PTR(emesg);
elen = RSTRING_LEN(emesg);

View file

@ -1407,6 +1407,9 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
message = e.full_message(highlight: true)
assert_match(/\e/, message)
assert_not_match(/(\e\[1)m\1/, message)
e2 = assert_raise(RuntimeError) {raise RuntimeError, "", bt}
assert_not_match(/(\e\[1)m\1/, e2.full_message(highlight: true))
message = e.full_message
if Exception.to_tty?