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

Trim extra whitespace in inaccesible error message

One whitespace is already included in `inaccessible_mesg_for` macro.
This extra whitespace is included since 72ff61f4a8
This commit is contained in:
OKURA Masafumi 2021-05-03 22:38:51 +09:00 committed by Hiroshi SHIBATA
parent f2ffa88964
commit 8d5292f702
Notes: git 2021-09-01 13:19:15 +09:00

View file

@ -430,8 +430,8 @@ rb_print_inaccessible(VALUE klass, ID id, rb_method_visibility_t visi)
switch (visi & METHOD_VISI_MASK) {
case METHOD_VISI_UNDEF:
case METHOD_VISI_PUBLIC: mesg = inaccessible_mesg(""); break;
case METHOD_VISI_PRIVATE: mesg = inaccessible_mesg(" private"); break;
case METHOD_VISI_PROTECTED: mesg = inaccessible_mesg(" protected"); break;
case METHOD_VISI_PRIVATE: mesg = inaccessible_mesg("private"); break;
case METHOD_VISI_PROTECTED: mesg = inaccessible_mesg("protected"); break;
default: UNREACHABLE;
}
rb_name_err_raise_str(mesg, klass, ID2SYM(id));