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 /vm_method.c | |
parent | 9b429eb3b15321115d9a217c91c5510fe43777a7 (diff) |
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 'vm_method.c')
-rw-r--r-- | vm_method.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_method.c b/vm_method.c index 154cd8e601..cd91cad802 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1802,7 +1802,7 @@ rb_mod_private_method(int argc, VALUE *argv, VALUE obj) */ static VALUE -top_public(int argc, VALUE *argv) +top_public(int argc, VALUE *argv, VALUE _) { return rb_mod_public(argc, argv, rb_cObject); } @@ -1820,7 +1820,7 @@ top_public(int argc, VALUE *argv) * String arguments are converted to symbols. */ static VALUE -top_private(int argc, VALUE *argv) +top_private(int argc, VALUE *argv, VALUE _) { return rb_mod_private(argc, argv, rb_cObject); } |