From 80e679ef2d6f370e853e37053c73930c65b5e76c Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Fri, 6 Sep 2019 13:33:19 -0700 Subject: Fix keyword argument separation warnings for enumerators This makes objects created via #to_enum and related methods pass keyword arguments as keywords. To implement this, add a kw_splat member of struct enumerator and struct iter_method_arg, and add rb_block_call_kw, which is the same as rb_block_call_kw with a flag for whether the last argument is keyword options. --- include/ruby/ruby.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 1e4bafcc86..445b2cd4d3 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1967,6 +1967,7 @@ int rb_block_given_p(void); void rb_need_block(void); VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE); VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE); +VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int); VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE); VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...); VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list); -- cgit v1.2.3