From 5274f892015b2a41dc64c63a4ce1c843f4fb0a66 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 5 Aug 2010 09:36:16 +0000 Subject: * complex.c (nucomp_marshal_load): should check the argument. [ruby-core:31622] * rational.c (nurat_marshal_load): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rational.c | 1 + 1 file changed, 1 insertion(+) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 3965144b61..6e3b39639d 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); -- cgit v1.2.3