ruby-changes:48840
From: usa <ko1@a...>
Date: Fri, 1 Dec 2017 14:32:36 +0900 (JST)
Subject: [ruby-changes:48840] usa:r60957 (trunk): bold/underscore support in traceback before Windows10
usa 2017-12-01 14:32:29 +0900 (Fri, 01 Dec 2017) New Revision: 60957 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=60957 Log: bold/underscore support in traceback before Windows10 * io.c (rb_write_error2): call `rb_w32_write_console()` when the device is tty, like `rb_write_error_str()`. Modified files: trunk/io.c Index: io.c =================================================================== --- io.c (revision 60956) +++ io.c (revision 60957) @@ -7767,6 +7767,11 @@ void https://github.com/ruby/ruby/blob/trunk/io.c#L7767 rb_write_error2(const char *mesg, long len) { if (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0) { +#ifdef _WIN32 + if (isatty(fileno(stderr))) { + if (rb_w32_write_console(rb_str_new(mesg, len), fileno(stderr)) > 0) return; + } +#endif if (fwrite(mesg, sizeof(char), (size_t)len, stderr) < (size_t)len) { /* failed to write to stderr, what can we do? */ return; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/