Skip to content

Commit dc5f938

Browse files
committed
Prefer write_warn over write_warn2 with a string literal
1 parent c30cab8 commit dc5f938

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

eval_error.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
105105
if (highlight) write_warn(str, underline);
106106
write_warn(str, "unhandled exception");
107107
if (highlight) write_warn(str, reset);
108-
write_warn2(str, "\n", 1);
108+
write_warn(str, "\n");
109109
}
110110
else {
111111
VALUE epath;
@@ -176,18 +176,18 @@ rb_decorate_message(const VALUE eclass, const VALUE emesg, int highlight)
176176
write_warn(str, reset);
177177
write_warn(str, bold);
178178
}
179-
write_warn2(str, ")", 1);
179+
write_warn(str, ")");
180180
if (highlight) write_warn(str, reset);
181181
}
182182
if (tail && einfo+elen > tail) {
183183
if (!highlight) {
184-
write_warn2(str, "\n", 1);
184+
write_warn(str, "\n");
185185
write_warn_enc(str, tail, einfo+elen-tail, eenc);
186186
}
187187
else {
188188
elen -= tail - einfo;
189189
einfo = tail;
190-
write_warn2(str, "\n", 1);
190+
write_warn(str, "\n");
191191
while (elen > 0) {
192192
tail = memchr(einfo, '\n', elen);
193193
if (!tail || tail > einfo) {

0 commit comments

Comments
 (0)