diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-24 11:04:19 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-29 11:05:41 +0900 |
commit | 2b636dc81dcc2540e0548c856ac495722fcd3959 (patch) | |
tree | 9cafc52baadbf360e29e7e507294c7a65e0dc136 /eval.c | |
parent | 801752f577712b1eb81de224743865fce8f21adf (diff) | |
download | ruby-2b636dc81dcc2540e0548c856ac495722fcd3959.tar.gz |
make_exception: early return
The rb_exc_new3() result is already ready to be returned. No need to
fall through the switch.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -816,7 +816,7 @@ make_exception(int argc, const VALUE *argv, int isstr) if (isstr &&! NIL_P(exc)) { mesg = rb_check_string_type(exc); if (!NIL_P(mesg)) { - mesg = rb_exc_new3(rb_eRuntimeError, mesg); + return rb_exc_new3(rb_eRuntimeError, mesg); } } |