aboutsummaryrefslogtreecommitdiffstats
path: root/class.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-28 17:48:48 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 18:34:09 +0900
commit7b6fde4258e700c0e0292bb091aa84a5e473342e (patch)
treea9ac636ca63307dd4507e99814ae511daa96e34a /class.c
parent9ef51b0b89a10c8c401cb9f2337e47a25be72cbe (diff)
downloadruby-7b6fde4258e700c0e0292bb091aa84a5e473342e.tar.gz
drop-in type check for rb_define_module_function
We can check the function pointer passed to rb_define_module_function like how we do so in rb_define_method. The difference is that this changeset reveales lots of atiry mismatches.
Diffstat (limited to 'class.c')
-rw-r--r--class.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/class.c b/class.c
index f35e9bb38b..05440f523b 100644
--- a/class.c
+++ b/class.c
@@ -1750,8 +1750,9 @@ rb_define_singleton_method(VALUE obj, const char *name, VALUE (*func)(ANYARGS),
rb_define_method(singleton_class_of(obj), name, func, argc);
}
-
-
+#ifdef rb_define_module_function
+#undef rb_define_module_function
+#endif
/*!
* Defines a module function for \a module.
* \param module an module or a class.