aboutsummaryrefslogtreecommitdiffstats
path: root/marshal.c
diff options
context:
space:
mode:
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/marshal.c b/marshal.c
index e05b9f5c76..046729d364 100644
--- a/marshal.c
+++ b/marshal.c
@@ -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;