From 88d9f7aeac3b438561bfaedeb0d2b9173160dfda Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 1 Mar 2008 03:42:06 +0000 Subject: [PATCH] * string.c (sym_inspect): use rb_str_inspect() instead of rb_str_dump(). [ruby-dev:33946] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ string.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 3f425cdb9c..d9ce30ab42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Mar 1 12:34:21 2008 Yukihiro Matsumoto + + * string.c (sym_inspect): use rb_str_inspect() instead of + rb_str_dump(). [ruby-dev:33946] + Sat Mar 1 12:15:42 2008 Yukihiro Matsumoto * eval_method.c (rb_get_method_body): ent->method may be freed by diff --git a/string.c b/string.c index 566c5de818..b07337ca42 100644 --- a/string.c +++ b/string.c @@ -6290,7 +6290,7 @@ sym_inspect(VALUE sym) memcpy(RSTRING_PTR(str)+1, RSTRING_PTR(sym), RSTRING_LEN(sym)); if (RSTRING_LEN(sym) != strlen(RSTRING_PTR(sym)) || !rb_enc_symname_p(RSTRING_PTR(sym), enc)) { - str = rb_str_dump(str); + str = rb_str_inspect(str); strncpy(RSTRING_PTR(str), ":\"", 2); } if (klass != Qundef) {