summaryrefslogtreecommitdiff
path: root/internal/string.h
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2021-11-30 16:27:12 +0900
committerYusuke Endoh <mame@ruby-lang.org>2022-06-07 11:07:09 +0900
commit9d927204e7b86eb00bfd07a060a6383139edf741 (patch)
tree104a9f92a462773adb5d5916068fa9b00152ed9d /internal/string.h
parentdbfb3b1917dbe89816ffeea6046d2743c32bf6b6 (diff)
downloadruby-9d927204e7b86eb00bfd07a060a6383139edf741.tar.gz
error.c: Let Exception#inspect inspect its message
... only when the message string has a newline. `p StandardError.new("foo\nbar")` now prints `#<StandardError: "foo\nbar">' instead of: #<StandardError: bar> [Bug #18170]
Diffstat (limited to 'internal/string.h')
-rw-r--r--internal/string.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/string.h b/internal/string.h
index 18b01862f7..57a4af49c7 100644
--- a/internal/string.h
+++ b/internal/string.h
@@ -43,6 +43,7 @@ char *rb_str_to_cstr(VALUE str);
const char *ruby_escaped_char(int c);
void rb_str_make_independent(VALUE str);
int rb_enc_str_coderange_scan(VALUE str, rb_encoding *enc);
+VALUE rb_str_include(VALUE str, VALUE arg);
static inline bool STR_EMBED_P(VALUE str);
static inline bool STR_SHARED_P(VALUE str);