summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
author卜部昌平 <shyouhei@ruby-lang.org>2019-08-28 18:19:11 +0900
committer卜部昌平 <shyouhei@ruby-lang.org>2019-08-29 18:34:09 +0900
commit7bcfd9189a6a0b2ad58fed988faaf795a4987893 (patch)
tree219f0c172e038ea6be1e103db11f7457dc703328 /vm_eval.c
parent7b6fde4258e700c0e0292bb091aa84a5e473342e (diff)
drop-in type check for rb_define_global_function
We can check the function pointer passed to rb_define_global_function like we do so in rb_define_method. It turns out that almost anybody is misunderstanding the API.
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_eval.c b/vm_eval.c
index 8c7e01edce..a31f4865ed 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -1880,7 +1880,7 @@ uncaught_throw_to_s(VALUE exc)
*/
static VALUE
-rb_f_throw(int argc, VALUE *argv)
+rb_f_throw(int argc, VALUE *argv, VALUE _)
{
VALUE tag, value;
@@ -2085,7 +2085,7 @@ local_var_list_add(const struct local_var_list *vars, ID lid)
*/
static VALUE
-rb_f_local_variables(void)
+rb_f_local_variables(VALUE _)
{
struct local_var_list vars;
rb_execution_context_t *ec = GET_EC();
@@ -2142,7 +2142,7 @@ rb_f_local_variables(void)
static VALUE
-rb_f_block_given_p(void)
+rb_f_block_given_p(VALUE _)
{
rb_execution_context_t *ec = GET_EC();
rb_control_frame_t *cfp = ec->cfp;