summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-07-14 17:15:44 +0900
committerYusuke Endoh <mame@ruby-lang.org>2019-07-14 17:16:19 +0900
commit934e6b2aeb495686f7fe0d8b1c69d863e6fca072 (patch)
tree169ec674f55877f045380d457ff590e6a592489f /eval.c
parent10de5f149acc620e12be5943e4e29f4f555b7551 (diff)
Prefer `rb_error_arity` to `rb_check_arity` when it can be used
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index fa3ec22..75648f1 100644
--- a/eval.c
+++ b/eval.c
@@ -790,8 +790,7 @@ make_exception(int argc, const VALUE *argv, int isstr)
}
break;
default:
- rb_check_arity(argc, 0, 3);
- break;
+ rb_error_arity(argc, 0, 3);
}
if (argc > 0) {
if (!rb_obj_is_kind_of(mesg, rb_eException))