Do not include a backtick in error messages and backtraces

[Feature #16495]
This commit is contained in:
Yusuke Endoh 2024-01-19 16:03:38 +09:00
parent 926277bf82
commit 25d74b9527
64 changed files with 344 additions and 332 deletions

View file

@ -396,7 +396,7 @@ location_format(VALUE file, int lineno, VALUE name)
rb_str_cat_cstr(s, "unknown method");
}
else {
rb_str_catf(s, "`%s'", RSTRING_PTR(name));
rb_str_catf(s, "'%s'", RSTRING_PTR(name));
}
return s;
}
@ -973,7 +973,7 @@ oldbt_print(void *data, VALUE file, int lineno, VALUE name)
RSTRING_PTR(file), lineno);
}
else {
fprintf(fp, "\tfrom %s:%d:in `%s'\n",
fprintf(fp, "\tfrom %s:%d:in '%s'\n",
RSTRING_PTR(file), lineno, RSTRING_PTR(name));
}
}
@ -1012,7 +1012,7 @@ oldbt_bugreport(void *arg, VALUE file, int line, VALUE method)
fprintf(fp, "%s:%d:in unknown method\n", filename, line);
}
else {
fprintf(fp, "%s:%d:in `%s'\n", filename, line, RSTRING_PTR(method));
fprintf(fp, "%s:%d:in '%s'\n", filename, line, RSTRING_PTR(method));
}
}
@ -1053,7 +1053,7 @@ oldbt_print_to(void *data, VALUE file, int lineno, VALUE name)
rb_str_cat2(str, "unknown method\n");
}
else {
rb_str_catf(str, " `%"PRIsVALUE"'\n", name);
rb_str_catf(str, " '%"PRIsVALUE"'\n", name);
}
(*arg->iter)(arg->output, str);
}