summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 11:54:48 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 11:54:48 +0000
commit5d0c0c192cc865d8b1848667d554a848274133e7 (patch)
treeac7be4a6f84223ac474546f22524d13fb0fb946d /rational.c
parent8c36fa1316dfe670534a8f2ef532b866e1ca1fdb (diff)
merges r28869 from trunk into ruby_1_9_2.
-- * 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/branches/ruby_1_9_2@28874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/rational.c b/rational.c
index f5a6d2655f..bd43a3617c 100644
--- a/rational.c
+++ b/rational.c
@@ -1577,6 +1577,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);