diff options
author | Nobuyoshi Nakada <[email protected]> | 2021-01-29 13:09:38 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2021-01-29 14:27:53 +0900 |
commit | 9241211538189a58b477bd55b539357617fd42ed (patch) | |
tree | e3e97a2b46554f9100623a5289b94b17ec065177 /ext/pathname/pathname.c | |
parent | acb6b395b63ff992ea89ef4dbdff32e5b54e0b20 (diff) |
Forward keyword arguments for Pathname#each_line [Bug #17589]
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4128
Diffstat (limited to 'ext/pathname/pathname.c')
-rw-r--r-- | ext/pathname/pathname.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/pathname/pathname.c b/ext/pathname/pathname.c index 6f4c8d23b5..55577d7da7 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); } } |