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
This commit is contained in:
mame 2010-08-05 11:54:48 +00:00
parent 8c36fa1316
commit 5d0c0c192c
6 changed files with 26 additions and 0 deletions

View file

@ -1239,6 +1239,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);