each_line(p1 = v1, p2 = v2, p3 = v3)
public
Iterates over each line in the file and yields a String object for each.
Show source
static VALUE
path_each_line(int argc, VALUE *argv, VALUE self)
{
VALUE args[4];
int n;
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_cIO, id_foreach, 1+n, args, 0, 0);
}
else {
return rb_funcallv(rb_cIO, id_foreach, 1+n, args);
}
}