1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
matz 2008-03-01 03:42:06 +00:00
parent 207b8292ba
commit 88d9f7aeac
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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) {