summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index a6538606f6..1aae3b6ca8 100644
--- a/complex.c
+++ b/complex.c
@@ -1259,6 +1259,10 @@ static VALUE
nucomp_marshal_load(VALUE self, VALUE a)
{
get_dat1(self);
+
+ rb_check_frozen(self);
+ rb_check_trusted(self);
+
Check_Type(a, T_ARRAY);
if (RARRAY_LEN(a) != 2)
rb_raise(rb_eArgError, "marshaled complex must have an array whose length is 2 but %ld", RARRAY_LEN(a));