1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* complex.c (nucomp_sub, nucomp_expt): call corresponding functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-03-20 16:41:51 +00:00
parent d0c2b919ed
commit b9fd3e4e85
3 changed files with 9 additions and 5 deletions

View file

@ -753,7 +753,7 @@ nucomp_sub(VALUE self, VALUE other)
default:
{
VALUE a = f_coerce(other, self);
return f_add(RARRAY_PTR(a)[0], RARRAY_PTR(a)[1]);
return f_sub(RARRAY_PTR(a)[0], RARRAY_PTR(a)[1]);
}
}
}
@ -909,7 +909,7 @@ nucomp_expt(VALUE self, VALUE other)
default:
{
VALUE a = f_coerce(other, self);
return f_div(RARRAY_PTR(a)[0], RARRAY_PTR(a)[1]);
return f_expt(RARRAY_PTR(a)[0], RARRAY_PTR(a)[1]);
}
}
}