From 7ae65b24c26bc2dc7a0bf2fe829e3062f58e063a Mon Sep 17 00:00:00 2001 From: glass Date: Mon, 2 Oct 2017 05:29:11 +0000 Subject: vm_eval.c: add rb_yield_assoc_or_values() The new function rb_yield_assoc_or_values() will reduce branching. * vm_eval.c: add rb_yield_assoc_or_values() * internal.h: ditto * hash.c: use rb_yield_assoc_or_values() * struct.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60095 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'internal.h') diff --git a/internal.h b/internal.h index 0b2e6366ee..a3dbbcc1db 100644 --- a/internal.h +++ b/internal.h @@ -1768,6 +1768,7 @@ VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE); VALUE rb_yield_1(VALUE val); VALUE rb_yield_force_blockarg(VALUE values); +VALUE rb_yield_assoc_or_values(VALUE key, VALUE value); VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t bl_proc, int min_argc, int max_argc, VALUE data2); -- cgit v1.2.3