summaryrefslogtreecommitdiff
path: root/complex.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 09:36:16 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-05 09:36:16 +0000
commit5274f892015b2a41dc64c63a4ce1c843f4fb0a66 (patch)
treecc9c9cec201b0695bf0284cce027902448a11b4e /complex.c
parent359d53787821dc287d0411565801d54791f0a9c6 (diff)
* 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
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/complex.c b/complex.c
index eb9ceaeac6..1052c0c458 100644
--- a/complex.c
+++ b/complex.c
@@ -1247,6 +1247,7 @@ static VALUE
nucomp_marshal_load(VALUE self, VALUE a)
{
get_dat1(self);
+ Check_Type(a, T_ARRAY);
dat->real = RARRAY_PTR(a)[0];
dat->imag = RARRAY_PTR(a)[1];
rb_copy_generic_ivar(self, a);