From 89ae71d72157aa8800443741ff328199d7ba59e5 Mon Sep 17 00:00:00 2001 From: tadf Date: Sun, 3 Jun 2012 01:26:41 +0000 Subject: * 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 --- rational.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 8d0e8306f5..c4469c8092 100644 --- a/rational.c +++ b/rational.c @@ -1605,6 +1605,10 @@ static VALUE nurat_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 rational must have an array whose length is 2 but %ld", RARRAY_LEN(a)); -- cgit v1.2.3