diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-28 18:19:11 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2019-08-29 18:34:09 +0900 |
commit | 7bcfd9189a6a0b2ad58fed988faaf795a4987893 (patch) | |
tree | 219f0c172e038ea6be1e103db11f7457dc703328 /vm_eval.c | |
parent | 7b6fde4258e700c0e0292bb091aa84a5e473342e (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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |