diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-22 08:50:25 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2017-02-22 08:50:25 +0000 |
commit | 5318154fe1ac6f8dff014988488b9e063988a105 (patch) | |
tree | 95c52dda086205d9abd64206ebe8a213ac9e1fca /io.c | |
parent | dbd4c4a7b373061d235857f7f34e15859a7f1051 (diff) | |
download | ruby-5318154fe1ac6f8dff014988488b9e063988a105.tar.gz |
eval_error.c: backstrace in reverse order
* eval_error.c (rb_threadptr_error_print): print backtrace and
error message in reverse order if STDERR is unchanged and a tty.
[Feature #8661]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57685 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -7400,6 +7400,14 @@ rb_write_error_str(VALUE mesg) } } +int +rb_stderr_tty_p(void) +{ + if (rb_stderr == orig_stderr || RFILE(orig_stderr)->fptr->fd < 0) + return isatty(fileno(stderr)); + return 0; +} + static void must_respond_to(ID mid, VALUE val, ID id) { |