/*
* call-seq:
* strio.each(sep_string=$/) {|line| block } -> strio
* strio.each_line(sep_string=$/) {|line| block } -> strio
*
* See IO
*/
static VALUE
strio_each(argc, argv, self)
int argc;
VALUE *argv;
VALUE self;
{
struct StringIO *ptr = StringIO(self);
VALUE line;
RETURN_ENUMERATOR(self, argc, argv);
while (!NIL_P(line = strio_getline(argc, argv, readable(ptr)))) {
rb_yield(line);
}
return self;
}