aboutsummaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 01:26:41 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 01:26:41 +0000
commit89ae71d72157aa8800443741ff328199d7ba59e5 (patch)
treee6fe98c67139e01ca14d43237aa509fe7a7af6b9 /complex.c
parent82cd48d7ee799ff1cd37c0ea0be2ab0d0aea9a2e (diff)
downloadruby-89ae71d72157aa8800443741ff328199d7ba59e5.tar.gz
* complex.c (nucomp_marshal_load): [ruby-core:45394]
* rational.c (nurat_marshal_load): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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));