diff options
Diffstat (limited to 'marshal.c')
-rw-r--r-- | marshal.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1025,7 +1025,7 @@ r_byte(struct load_arg *arg) { int c; - if (TYPE(arg->src) == T_STRING) { + if (RB_TYPE_P(arg->src, T_STRING)) { if (RSTRING_LEN(arg->src) > arg->offset) { c = (unsigned char)RSTRING_PTR(arg->src)[arg->offset++]; } @@ -1099,7 +1099,7 @@ r_bytes0(long len, struct load_arg *arg) VALUE str; if (len == 0) return rb_str_new(0, 0); - if (TYPE(arg->src) == T_STRING) { + if (RB_TYPE_P(arg->src, T_STRING)) { if (RSTRING_LEN(arg->src) - arg->offset >= len) { str = rb_str_new(RSTRING_PTR(arg->src)+arg->offset, len); arg->offset += len; |