summaryrefslogtreecommitdiff
path: root/numeric.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 /numeric.c
parent10de5f149acc620e12be5943e4e29f4f555b7551 (diff)
Prefer `rb_error_arity` to `rb_check_arity` when it can be used
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 1fce19ac0b..90eabc29e0 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3418,8 +3418,7 @@ int_chr(int argc, VALUE *argv, VALUE num)
case 1:
break;
default:
- rb_check_arity(argc, 0, 1);
- break;
+ rb_error_arity(argc, 0, 1);
}
enc = rb_to_encoding(argv[0]);
if (!enc) enc = rb_ascii8bit_encoding();