mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Escape unprintable chars only, without surrounding quotes
This commit is contained in:
parent
8cc18703cf
commit
eec45a93ef
Notes:
git
2021-07-24 17:59:09 +09:00
4 changed files with 6 additions and 10 deletions
|
@ -1121,7 +1121,7 @@ ruby__sfvextra(rb_printf_buffer *fp, size_t valsize, void *valp, long *sz, int s
|
|||
else if (SYMBOL_P(value)) {
|
||||
value = rb_sym2str(value);
|
||||
if (sign == ' ' && !rb_str_symname_p(value)) {
|
||||
value = rb_str_inspect(value);
|
||||
value = rb_str_escape(value);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue