diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 10:40:40 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 18:34:09 +0900 |
commit | 0b81e7d6e2810adac081965f0da1d8064888c0bd (patch) | |
tree | 0ad28e52f3395e56d0a7c9c0a704c3195aa8c99c /class.c | |
parent | 0766f67168cf248b698a8b2cde1c22c526374be7 (diff) | |
download | ruby-0b81e7d6e2810adac081965f0da1d8064888c0bd.tar.gz |
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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |