diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-28 21:11:22 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-11-28 21:11:22 +0000 |
commit | e5658a206be8693b4aa006a853b2dd934fb797e0 (patch) | |
tree | af87f775a6e7b10fdfbd10229c2dd77d740807e7 /eval_error.c | |
parent | 2b92335efd4c561ad7a9ad25367838857602e067 (diff) |
* eval_error.c (error_print): respect the encoding of the message.
* io.c (rb_write_error_str): use rb_w32_write_console() on Windows
if stderr is a tty.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r-- | eval_error.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eval_error.c b/eval_error.c index 6d43fe3c7c..12cfe36571 100644 --- a/eval_error.c +++ b/eval_error.c @@ -162,14 +162,14 @@ error_print(void) tail++; /* skip newline */ } warn_print(": "); - warn_print2(einfo, len); + warn_print_str(tail ? rb_str_subseq(e, 0, len) : e); if (epath) { warn_print(" ("); warn_print_str(epath); warn_print(")\n"); } if (tail) { - warn_print2(tail, elen - len - 1); + warn_print_str(rb_str_substr(e, tail - einfo, elen - len - 1)); } if (tail ? einfo[elen-1] != '\n' : !epath) warn_print2("\n", 1); } |