diff options
author | Benoit Daloze <eregontp@gmail.com> | 2020-02-28 19:07:17 +0100 |
---|---|---|
committer | Benoit Daloze <eregontp@gmail.com> | 2020-02-28 19:07:17 +0100 |
commit | a0f5ff4c3cd05f8717be2bf1d79f0817f288d398 (patch) | |
tree | 441f409cf816cf8a61dacdbaf204ae9f5cbe2f18 /spec/ruby/optional/capi/ext/kernel_spec.c | |
parent | 5d210501825e1682e68cbfc2be424fc339f382fa (diff) | |
download | ruby-a0f5ff4c3cd05f8717be2bf1d79f0817f288d398.tar.gz |
Update to ruby/spec@41bf282
Diffstat (limited to 'spec/ruby/optional/capi/ext/kernel_spec.c')
-rw-r--r-- | spec/ruby/optional/capi/ext/kernel_spec.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/optional/capi/ext/kernel_spec.c b/spec/ruby/optional/capi/ext/kernel_spec.c index c5bb4a1d9a..13d9598125 100644 --- a/spec/ruby/optional/capi/ext/kernel_spec.c +++ b/spec/ruby/optional/capi/ext/kernel_spec.c @@ -68,7 +68,7 @@ VALUE rb_block_call_extra_data(VALUE self, VALUE object) { } VALUE kernel_spec_rb_block_call_no_func(VALUE self, VALUE ary) { - return rb_block_call(ary, rb_intern("map"), 0, NULL, NULL, Qnil); + return rb_block_call(ary, rb_intern("map"), 0, NULL, (rb_block_call_func_t)NULL, Qnil); } @@ -153,6 +153,10 @@ VALUE kernel_spec_rb_rescue(VALUE self, VALUE main_proc, VALUE arg, rb_ary_push(main_array, main_proc); rb_ary_push(main_array, arg); + if (raise_proc == Qnil) { + return rb_rescue(kernel_spec_call_proc, main_array, NULL, arg2); + } + raise_array = rb_ary_new(); rb_ary_push(raise_array, raise_proc); rb_ary_push(raise_array, arg2); |