summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 10:57:48 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 18:34:09 +0900
commitbfe5d22f89a871b6c1cb556c0115145ade9fe286 (patch)
tree75a0e1bdac504cae90b09341a54e96f8ccedd772 /class.c
parent9b429eb3b15321115d9a217c91c5510fe43777a7 (diff)
downloadbundler-bfe5d22f89a871b6c1cb556c0115145ade9fe286.tar.gz
drop-in type check for rb_define_private_method
We can check the function pointer passed to rb_define_private_method like how we do so in rb_define_method. Doing so revealed some problematic usages of rb_obj_dummy. They had to be split according to their arity.
Diffstat (limited to 'class.c')
-rw-r--r--class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/class.c b/class.c
index 809bfd8c9d..0714f54e16 100644
--- a/class.c
+++ b/class.c
@@ -1561,6 +1561,9 @@ rb_define_protected_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS)
rb_add_method_cfunc(klass, rb_intern(name), func, argc, METHOD_VISI_PROTECTED);
}
+#ifdef rb_define_private_method
+#undef rb_define_private_method
+#endif
void
rb_define_private_method(VALUE klass, const char *name, VALUE (*func)(ANYARGS), int argc)
{