aboutsummaryrefslogtreecommitdiffstats
path: root/class.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 /class.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 'class.c')
-rw-r--r--class.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/class.c b/class.c
index 0714f54e16..2e8710194d 100644
--- a/class.c
+++ b/class.c
@@ -1746,6 +1746,9 @@ rb_singleton_class(VALUE obj)
* \{
*/
+#ifdef rb_define_singleton_method
+#undef rb_define_singleton_method
+#endif
/*!
* Defines a singleton method for \a obj.
* \param obj an arbitrary object