diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-10 15:23:44 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2023-04-10 15:23:44 +0900 |
commit | dc5f9387654a89ee18384ddec1bde5b44f7c238d (patch) | |
tree | 958068c3b3babc95aa7ca04e562979186c54fc8b /eval_error.c | |
parent | c30cab8ce4d2ab21ef75e2a3218cb76b21d78407 (diff) | |
download | ruby-dc5f9387654a89ee18384ddec1bde5b44f7c238d.tar.gz |
Prefer `write_warn` over `write_warn2` with a string literal
Diffstat (limited to 'eval_error.c')
-rw-r--r-- | eval_error.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eval_error.c b/eval_error.c index a5c252ba1d..04891f4369 100644 --- a/eval_error.c +++ b/eval_error.c @@ -105,7 +105,7 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA if (highlight) write_warn(str, underline); write_warn(str, "unhandled exception"); if (highlight) write_warn(str, reset); - write_warn2(str, "\n", 1); + write_warn(str, "\n"); } else { VALUE epath; @@ -176,18 +176,18 @@ rb_decorate_message(const VALUE eclass, const VALUE emesg, int highlight) write_warn(str, reset); write_warn(str, bold); } - write_warn2(str, ")", 1); + write_warn(str, ")"); if (highlight) write_warn(str, reset); } if (tail && einfo+elen > tail) { if (!highlight) { - write_warn2(str, "\n", 1); + write_warn(str, "\n"); write_warn_enc(str, tail, einfo+elen-tail, eenc); } else { elen -= tail - einfo; einfo = tail; - write_warn2(str, "\n", 1); + write_warn(str, "\n"); while (elen > 0) { tail = memchr(einfo, '\n', elen); if (!tail || tail > einfo) { |