summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornagachika <nagachika@ruby-lang.org>2021-02-20 18:06:43 +0900
committernagachika <nagachika@ruby-lang.org>2021-02-20 18:06:43 +0900
commit0cfd491732162eab61227ac4b49617c37ddbb316 (patch)
treee4429b0257b3e984cd694b2470b2f1acc2146274 /ext
parent3d39ad217866138de1d3597440ef6358690b3435 (diff)
merge revision(s) 9241211538189a58b477bd55b539357617fd42ed: [Backport #17589]
Forward keyword arguments for Pathname#each_line [Bug #17589] --- ext/pathname/pathname.c | 4 ++-- test/pathname/test_pathname.rb | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-)
Diffstat (limited to 'ext')
-rw-r--r--ext/pathname/pathname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c
index 15f80d487e..0f4854580e 100644
--- a/ext/pathname/pathname.c
+++ b/ext/pathname/pathname.c
@@ -360,10 +360,10 @@ path_each_line(int argc, VALUE *argv, VALUE self)
args[0] = get_strpath(self);
n = rb_scan_args(argc, argv, "03", &args[1], &args[2], &args[3]);
if (rb_block_given_p()) {
- return rb_block_call(rb_cFile, id_foreach, 1+n, args, 0, 0);
+ return rb_block_call_kw(rb_cFile, id_foreach, 1+n, args, 0, 0, RB_PASS_CALLED_KEYWORDS);
}
else {
- return rb_funcallv(rb_cFile, id_foreach, 1+n, args);
+ return rb_funcallv_kw(rb_cFile, id_foreach, 1+n, args, RB_PASS_CALLED_KEYWORDS);
}
}