summaryrefslogtreecommitdiff
path: root/vm_eval.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_eval.c')
-rw-r--r--vm_eval.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/vm_eval.c b/vm_eval.c
index f6a1cc0..c741773 100644
--- a/vm_eval.c
+++ b/vm_eval.c
@@ -989,6 +989,15 @@ rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
return rb_call(recv, mid, argc, argv, CALL_PUBLIC);
}
+VALUE
+rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
+{
+ VALUE v = rb_adjust_argv_kw_splat(&argc, &argv, &kw_splat);
+ VALUE ret = rb_call(recv, mid, argc, argv, kw_splat ? CALL_PUBLIC_KW : CALL_PUBLIC);
+ rb_free_tmp_buffer(&v);
+ return ret;
+}
+
/*!
* Calls a method
* \private
@@ -1033,6 +1042,17 @@ rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
}
VALUE
+rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
+{
+ VALUE v = rb_adjust_argv_kw_splat(&argc, &argv, &kw_splat);
+ VALUE ret;
+ PASS_PASSED_BLOCK_HANDLER();
+ ret = rb_call(recv, mid, argc, argv, kw_splat ? CALL_PUBLIC_KW : CALL_PUBLIC);
+ rb_free_tmp_buffer(&v);
+ return ret;
+}
+
+VALUE
rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE passed_procval)
{
if (!NIL_P(passed_procval)) {
@@ -1279,6 +1299,19 @@ rb_yield_splat(VALUE values)
}
VALUE
+rb_yield_splat_kw(VALUE values, int kw_splat)
+{
+ VALUE tmp = rb_check_array_type(values);
+ VALUE v;
+ if (NIL_P(tmp)) {
+ rb_raise(rb_eArgError, "not an array");
+ }
+ v = rb_yield_0_kw(RARRAY_LENINT(tmp), RARRAY_CONST_PTR(tmp), kw_splat);
+ RB_GC_GUARD(tmp);
+ return v;
+}
+
+VALUE
rb_yield_force_blockarg(VALUE values)
{
return vm_yield_force_blockarg(GET_EC(), values);