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:
parent
b452c03a14
commit
0c6c937904
2 changed files with 3 additions and 2 deletions
|
@ -144,8 +144,6 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
|
||||||
write_warn(str, ": ");
|
write_warn(str, ": ");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (highlight) write_warn(str, bold);
|
|
||||||
|
|
||||||
if (!NIL_P(emesg)) {
|
if (!NIL_P(emesg)) {
|
||||||
einfo = RSTRING_PTR(emesg);
|
einfo = RSTRING_PTR(emesg);
|
||||||
elen = RSTRING_LEN(emesg);
|
elen = RSTRING_LEN(emesg);
|
||||||
|
|
|
@ -1407,6 +1407,9 @@ $stderr = $stdout; raise "\x82\xa0"') do |outs, errs, status|
|
||||||
|
|
||||||
message = e.full_message(highlight: true)
|
message = e.full_message(highlight: true)
|
||||||
assert_match(/\e/, message)
|
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
|
message = e.full_message
|
||||||
if Exception.to_tty?
|
if Exception.to_tty?
|
||||||
|
|
Loading…
Add table
Reference in a new issue