diff options
author | Yusuke Endoh <[email protected]> | 2022-06-07 11:50:58 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2022-06-07 11:52:44 +0900 |
commit | b9f030954a8a1572032f3548b39c5b8ac35792ce (patch) | |
tree | 1d669c7d3593c57562556bc464947116de0ceacd /error.c | |
parent | 082c2d1b053280890d5b670a2a3f87540dfe4dcf (diff) |
Revert "error.c: Let Exception#inspect inspect its message"
This reverts commit 9d927204e7b86eb00bfd07a060a6383139edf741.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5981
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 12 |
1 files changed, 2 insertions, 10 deletions
@@ -34,7 +34,6 @@ #include "internal/io.h" #include "internal/load.h" #include "internal/object.h" -#include "internal/string.h" #include "internal/symbol.h" #include "internal/thread.h" #include "internal/variable.h" @@ -1423,15 +1422,8 @@ exc_inspect(VALUE exc) str = rb_str_buf_new2("#<"); klass = rb_class_name(klass); rb_str_buf_append(str, klass); - - if (RTEST(rb_str_include(exc, rb_str_new2("\n")))) { - rb_str_catf(str, ":%+"PRIsVALUE, exc); - } - else { - rb_str_buf_cat(str, ": ", 2); - rb_str_buf_append(str, exc); - } - + rb_str_buf_cat(str, ": ", 2); + rb_str_buf_append(str, exc); rb_str_buf_cat(str, ">", 1); return str; |