io.c:3644
static VALUE
io_s_foreach(arg)
    struct foreach_arg *arg;
{
    VALUE str;

    while (!NIL_P(str = rb_io_getline(arg->sep, arg->fptr))) {
	rb_yield(str);
    }
    return Qnil;
}
