Skip to content

Commit

Permalink
* string.c (sym_inspect): use rb_str_inspect() instead of
Browse files Browse the repository at this point in the history
  rb_str_dump().  [ruby-dev:33946]

git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15655 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Mar 1, 2008
1 parent b40893e commit ec2123e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Sat Mar 1 12:34:21 2008 Yukihiro Matsumoto <matz@ruby-lang.org>

* 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 <matz@ruby-lang.org>

* eval_method.c (rb_get_method_body): ent->method may be freed by
Expand Down
2 changes: 1 addition & 1 deletion string.c
Expand Up @@ -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) {
Expand Down

0 comments on commit ec2123e

Please sign in to comment.