diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-08 09:08:31 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-01-08 09:08:31 +0000 |
commit | 50784a0a4412df551d96dd01067473cd4226481b (patch) | |
tree | ac31564d8efa9913bc4b25bc1e099916d89f140d /error.c | |
parent | e52b102c36dc1dd609a97149e99edc7d1f96b7a4 (diff) | |
download | ruby-50784a0a4412df551d96dd01067473cd4226481b.tar.gz |
Defer escaping control char in error messages
* eval_error.c (print_errinfo): defer escaping control char in
error messages until writing to stderr, instead of quoting at
building the message. [ruby-core:90853] [Bug #15497]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1675,7 +1675,6 @@ name_err_mesg_to_str(VALUE obj) d = rb_any_to_s(obj); } singleton = (RSTRING_LEN(d) > 0 && RSTRING_PTR(d)[0] == '#'); - d = QUOTE(d); break; } if (!singleton) { @@ -1685,7 +1684,7 @@ name_err_mesg_to_str(VALUE obj) else { c = s = FAKE_CSTR(&s_str, ""); } - args[0] = QUOTE(rb_obj_as_string(ptr[NAME_ERR_MESG__NAME])); + args[0] = rb_obj_as_string(ptr[NAME_ERR_MESG__NAME]); args[1] = d; args[2] = s; args[3] = c; |