diff options
author | Benoit Daloze <eregontp@gmail.com> | 2021-07-06 18:52:29 +0200 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2021-07-16 12:11:24 +0200 |
commit | fd0df9c4fb36597e5e3f500670b29dbd77a14eca (patch) | |
tree | 5efd7ac323cc17519fbfd04104c1fc3be034fe5a /proc.c | |
parent | 301d194ee3b49e6b078eccb999dd538e9bfa8c7c (diff) | |
download | ruby-fd0df9c4fb36597e5e3f500670b29dbd77a14eca.tar.gz |
Emit deprecatation warnings for rb_iterate()
* It is obsolete since 1.9, see
https://github.com/ruby/ruby/blob/master/doc/extension.rdoc#label-Control+Structure
and [Misc #18025]
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -3153,18 +3153,6 @@ method_inspect(VALUE method) } static VALUE -mproc(VALUE method) -{ - return rb_funcallv(rb_mRubyVMFrozenCore, idProc, 0, 0); -} - -static VALUE -mlambda(VALUE method) -{ - return rb_funcallv(rb_mRubyVMFrozenCore, idLambda, 0, 0); -} - -static VALUE bmcall(RB_BLOCK_CALL_FUNC_ARGLIST(args, method)) { return rb_method_call_with_block_kw(argc, argv, method, blockarg, RB_PASS_CALLED_KEYWORDS); @@ -3175,7 +3163,7 @@ rb_proc_new( rb_block_call_func_t func, VALUE val) { - VALUE procval = rb_iterate(mproc, 0, func, val); + VALUE procval = rb_block_call(rb_mRubyVMFrozenCore, idProc, 0, 0, func, val); return procval; } @@ -3201,7 +3189,7 @@ method_to_proc(VALUE method) * end * end */ - procval = rb_iterate(mlambda, 0, bmcall, method); + procval = rb_block_call(rb_mRubyVMFrozenCore, idLambda, 0, 0, bmcall, method); GetProcPtr(procval, proc); proc->is_from_method = 1; return procval; |