summaryrefslogtreecommitdiff
path: root/marshal.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-14 05:30:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-06-14 05:30:29 +0000
commitabc49e493d6c1dc47586a7d1b616df5237bd606f (patch)
treedb7b8cc8d3495baf10d4e3d9c3f899233231d629 /marshal.c
parent00e9a8f0c33d8c7e384041e2bcce6d28d3450bb8 (diff)
2000-06-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'marshal.c')
-rw-r--r--marshal.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/marshal.c b/marshal.c
index dd8376a..4b385dc 100644
--- a/marshal.c
+++ b/marshal.c
@@ -384,7 +384,7 @@ w_object(obj, arg, limit)
rb_raise(rb_eTypeError, "uninitialized struct");
}
for (i=0; i<len; i++) {
- w_symbol(FIX2LONG(RARRAY(mem)->ptr[i]), arg);
+ w_symbol(SYM2ID(RARRAY(mem)->ptr[i]), arg);
w_object(RSTRUCT(obj)->ptr[i], arg, limit);
}
}
@@ -826,11 +826,11 @@ r_object(arg)
for (i=0; i<len; i++) {
slot = r_symbol(arg);
- if (RARRAY(mem)->ptr[i] != INT2FIX(slot)) {
+ if (RARRAY(mem)->ptr[i] != ID2SYM(slot)) {
rb_raise(rb_eTypeError, "struct %s not compatible (:%s for :%s)",
rb_class2name(klass),
rb_id2name(slot),
- rb_id2name(FIX2INT(RARRAY(mem)->ptr[i])));
+ rb_id2name(SYM2ID(RARRAY(mem)->ptr[i])));
}
rb_struct_aset(v, INT2FIX(i), r_object(arg));
}