= private = protected
each_byte()
See IO#each_byte.
static VALUE strio_each_byte(VALUE self) { struct StringIO *ptr = readable(self); RETURN_ENUMERATOR(self, 0, 0); while (ptr->pos < RSTRING_LEN(ptr->string)) { char c = RSTRING_PTR(ptr->string)[ptr->pos++]; rb_yield(CHR2FIX(c)); } return self; }