aboutsummaryrefslogtreecommitdiffstats
path: root/string.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 /string.c
parent10de5f149acc620e12be5943e4e29f4f555b7551 (diff)
downloadruby-934e6b2aeb495686f7fe0d8b1c69d863e6fca072.tar.gz
Prefer `rb_error_arity` to `rb_check_arity` when it can be used
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 8d7d2ad7b9..f76a417d45 100644
--- a/string.c
+++ b/string.c
@@ -5186,7 +5186,7 @@ str_gsub(int argc, VALUE *argv, VALUE str, int bang)
tainted = OBJ_TAINTED_RAW(repl);
break;
default:
- rb_check_arity(argc, 1, 2);
+ rb_error_arity(argc, 1, 2);
}
pat = get_pat_quoted(argv[0], 1);