diff options
author | 卜部昌平 <[email protected]> | 2019-08-28 18:19:11 +0900 |
---|---|---|
committer | 卜部昌平 <[email protected]> | 2019-08-29 18:34:09 +0900 |
commit | 7bcfd9189a6a0b2ad58fed988faaf795a4987893 () | |
tree | 219f0c172e038ea6be1e103db11f7457dc703328 /vm_backtrace.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.
-rw-r--r-- | vm_backtrace.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1007,7 +1007,7 @@ rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval) */ static VALUE -rb_f_caller(int argc, VALUE *argv) { return ec_backtrace_to_ary(GET_EC(), argc, argv, 1, 1, 1); } @@ -1035,7 +1035,7 @@ rb_f_caller(int argc, VALUE *argv) * entries within the specified range. */ static VALUE -rb_f_caller_locations(int argc, VALUE *argv) { return ec_backtrace_to_ary(GET_EC(), argc, argv, 1, 1, 0); } |