aboutsummaryrefslogtreecommitdiffstats
path: root/re.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 11:47:20 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 18:34:09 +0900
commit3df37259d81d9fc71f8b4f0b8d45dc9d0af81ab4 (patch)
tree961d975a0191b8385417c8107149a9610aa1f6dc /re.c
parentbfe5d22f89a871b6c1cb556c0115145ade9fe286 (diff)
downloadruby-3df37259d81d9fc71f8b4f0b8d45dc9d0af81ab4.tar.gz
drop-in type check for rb_define_singleton_method
We can check the function pointer passed to rb_define_singleton_method like how we do so in rb_define_method. Doing so revealed many arity mismatches.
Diffstat (limited to 're.c')
-rw-r--r--re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/re.c b/re.c
index d5f9a8792e..e61d9bc88c 100644
--- a/re.c
+++ b/re.c
@@ -3998,7 +3998,7 @@ match_setter(VALUE val, ID _x, VALUE *_y)
*/
static VALUE
-rb_reg_s_last_match(int argc, VALUE *argv)
+rb_reg_s_last_match(int argc, VALUE *argv, VALUE _)
{
if (rb_check_arity(argc, 0, 1) == 1) {
VALUE match = rb_backref_get();