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

* expand tabs.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
svn 2019-01-08 09:08:37 +00:00
parent 50784a0a44
commit 497075b3a1
2 changed files with 6 additions and 6 deletions

View file

@ -1684,7 +1684,7 @@ name_err_mesg_to_str(VALUE obj)
else {
c = s = FAKE_CSTR(&s_str, "");
}
args[0] = 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;

View file

@ -172,11 +172,11 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
if (RSTRING_PTR(epath)[0] == '#')
epath = 0;
if ((tail = memchr(einfo, '\n', elen)) != 0) {
write_warnq(str, emesg, einfo, tail - einfo);
write_warnq(str, emesg, einfo, tail - einfo);
tail++; /* skip newline */
}
else {
write_warnq(str, emesg, einfo, elen);
write_warnq(str, emesg, einfo, elen);
}
if (epath) {
write_warn(str, " (");
@ -192,7 +192,7 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
}
if (tail && einfo+elen > tail) {
if (!highlight) {
write_warnq(str, emesg, tail, einfo+elen-tail);
write_warnq(str, emesg, tail, einfo+elen-tail);
if (einfo[elen-1] != '\n') write_warn2(str, "\n", 1);
}
else {
@ -202,7 +202,7 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
tail = memchr(einfo, '\n', elen);
if (!tail || tail > einfo) {
write_warn(str, bold);
write_warnq(str, emesg, einfo, tail ? tail-einfo : elen);
write_warnq(str, emesg, einfo, tail ? tail-einfo : elen);
write_warn(str, reset);
if (!tail) {
write_warn2(str, "\n", 1);
@ -212,7 +212,7 @@ print_errinfo(const VALUE eclass, const VALUE errat, const VALUE emesg, const VA
elen -= tail - einfo;
einfo = tail;
do ++tail; while (tail < einfo+elen && *tail == '\n');
write_warnq(str, emesg, einfo, tail-einfo);
write_warnq(str, emesg, einfo, tail-einfo);
elen -= tail - einfo;
einfo = tail;
}