@@ -326,6 +326,10 @@ static VALUE kernel_spec_rb_funcallv(VALUE self, VALUE obj, VALUE method, VALUE
326
326
static VALUE kernel_spec_rb_funcallv_kw (VALUE self , VALUE obj , VALUE method , VALUE args ) {
327
327
return rb_funcallv_kw (obj , SYM2ID (method ), RARRAY_LENINT (args ), RARRAY_PTR (args ), RB_PASS_KEYWORDS );
328
328
}
329
+
330
+ static VALUE kernel_spec_rb_keyword_given_p (int argc , VALUE * args , VALUE self ) {
331
+ return rb_keyword_given_p () ? Qtrue : Qfalse ;
332
+ }
329
333
#endif
330
334
331
335
static VALUE kernel_spec_rb_funcallv_public (VALUE self , VALUE obj , VALUE method ) {
@@ -384,6 +388,7 @@ void Init_kernel_spec(void) {
384
388
rb_define_method (cls , "rb_funcallv" , kernel_spec_rb_funcallv , 3 );
385
389
#ifdef RUBY_VERSION_IS_3_0
386
390
rb_define_method (cls , "rb_funcallv_kw" , kernel_spec_rb_funcallv_kw , 3 );
391
+ rb_define_method (cls , "rb_keyword_given_p" , kernel_spec_rb_keyword_given_p , -1 );
387
392
#endif
388
393
rb_define_method (cls , "rb_funcallv_public" , kernel_spec_rb_funcallv_public , 2 );
389
394
rb_define_method (cls , "rb_funcall_many_args" , kernel_spec_rb_funcall_many_args , 2 );
0 commit comments