diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 10:57:48 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 18:34:09 +0900 |
commit | bfe5d22f89a871b6c1cb556c0115145ade9fe286 (patch) | |
tree | 75a0e1bdac504cae90b09341a54e96f8ccedd772 /class.c | |
parent | 9b429eb3b15321115d9a217c91c5510fe43777a7 (diff) | |
download | bundler-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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) { |