summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rational.c b/rational.c
index 3965144..6e3b396 100644
--- a/rational.c
+++ b/rational.c
@@ -1602,6 +1602,7 @@ static VALUE
nurat_marshal_load(VALUE self, VALUE a)
{
get_dat1(self);
+ Check_Type(a, T_ARRAY);
dat->num = RARRAY_PTR(a)[0];
dat->den = RARRAY_PTR(a)[1];
rb_copy_generic_ivar(self, a);