= private = protected
getbyte()
See IO#getbyte.
static VALUE strio_getbyte(VALUE self) { struct StringIO *ptr = readable(StringIO(self)); int c; if (ptr->pos >= RSTRING_LEN(ptr->string)) { return Qnil; } c = RSTRING_PTR(ptr->string)[ptr->pos++]; return CHR2FIX(c); }