Removed duplicate highlighting

This commit is contained in:
Nobuyoshi Nakada committed 2019-07-15 19:39:47 +09:00
1 parent b452c03a14
commit 0c6c937904
2 files changed
+3 -2

No files matched your search

-2
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);
+3
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?