summaryrefslogtreecommitdiff
path: root/class.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 10:40:40 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 18:34:09 +0900
commit0b81e7d6e2810adac081965f0da1d8064888c0bd (patch)
tree0ad28e52f3395e56d0a7c9c0a704c3195aa8c99c /class.c
parent0766f67168cf248b698a8b2cde1c22c526374be7 (diff)
drop-in type check for rb_define_method_id
We can check the function pointer passed to rb_define_method_id like how we do so in rb_define_method. This method is relatively rarely used so there are less problems found than the other APIs.
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 2f1e9d7d5d..c89af22c47 100644
--- a/class.c
+++ b/class.c
@@ -1534,6 +1534,9 @@ rb_obj_singleton_methods(int argc, const VALUE *argv, VALUE obj)
* \{
*/
+#ifdef rb_define_method_id
+#undef rb_define_method_id
+#endif
void
rb_define_method_id(VALUE klass, ID mid, VALUE (*func)(ANYARGS), int argc)
{