Delegate keywords from Enumerable#to_a to #each

Fixes [Bug #18289]
This commit is contained in:
Jeremy Evans 2021-11-05 07:08:21 -07:00
parent 907aa47527
commit e83c02a768
Notes: git 2021-11-06 00:22:41 +09:00
2 changed files with 6 additions and 1 deletions

2
enum.c
View file

@ -713,7 +713,7 @@ enum_to_a(int argc, VALUE *argv, VALUE obj)
{
VALUE ary = rb_ary_new();
rb_block_call(obj, id_each, argc, argv, collect_all, ary);
rb_block_call_kw(obj, id_each, argc, argv, collect_all, ary, RB_PASS_CALLED_KEYWORDS);
return ary;
}