marshal.c:827
static VALUE
r_bytes0(len, arg)
    long len;
    struct load_arg *arg;
{
    VALUE str;

    if (!arg->end) {
	VALUE src = (VALUE)arg->ptr;
	VALUE n = LONG2NUM(len);
	str = rb_funcall2(src, s_read, 1, &n);
	if (NIL_P(str)) goto too_short;
	StringValue(str);
	if (RSTRING(str)->len != len) goto too_short;
	if (OBJ_TAINTED(str)) arg->taint = Qtrue;
    }
    else {
	if (arg->ptr + len > arg->end) {
	  too_short:
	    rb_raise(rb_eArgError, "marshal data too short");
	}
	str = rb_str_new(arg->ptr, len);
	arg->ptr += len;
    }
    return str;
}
