aboutsummaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index eb9ceaeac6..1052c0c458 100644
--- a/complex.c
+++ b/complex.c
@@ -1247,6 +1247,7 @@ static VALUE
nucomp_marshal_load(VALUE self, VALUE a)
{
get_dat1(self);
+ Check_Type(a, T_ARRAY);
dat->real = RARRAY_PTR(a)[0];
dat->imag = RARRAY_PTR(a)[1];
rb_copy_generic_ivar(self, a);