diff options
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1378,6 +1378,12 @@ ruby__sfvextra(rb_printf_buffer *fp, size_t valsize, void *valp, long *sz, int s } value = rb_inspect(value); } + else if (SYMBOL_P(value)) { + value = rb_sym2str(value); + if (sign == ' ' && !rb_str_symname_p(value)) { + value = rb_str_inspect(value); + } + } else { value = rb_obj_as_string(value); if (sign == ' ') value = QUOTE(value); |