make_exception: early return
The rb_exc_new3() result is already ready to be returned. No need to fall through the switch.
This commit is contained in:
parent
801752f577
commit
2b636dc81d
Notes:
git
2020-06-29 11:06:33 +09:00
2
eval.c
2
eval.c
@ -816,7 +816,7 @@ make_exception(int argc, const VALUE *argv, int isstr)
|
|||||||
if (isstr &&! NIL_P(exc)) {
|
if (isstr &&! NIL_P(exc)) {
|
||||||
mesg = rb_check_string_type(exc);
|
mesg = rb_check_string_type(exc);
|
||||||
if (!NIL_P(mesg)) {
|
if (!NIL_P(mesg)) {
|
||||||
mesg = rb_exc_new3(rb_eRuntimeError, mesg);
|
return rb_exc_new3(rb_eRuntimeError, mesg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user