summaryrefslogtreecommitdiffstats
path: root/complex.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-20 16:41:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-03-20 16:41:51 +0000
commit98ac86199bb60117bc6f9798df528df9de5be9cc (patch)
treeac5674cca951de79f68bef31f3b309163c46fe83 /complex.c
parentc339ee6381632202bb86506c529804c8a5881981 (diff)
downloadruby-98ac86199bb60117bc6f9798df528df9de5be9cc.tar.gz
ruby-98ac86199bb60117bc6f9798df528df9de5be9cc.tar.xz
ruby-98ac86199bb60117bc6f9798df528df9de5be9cc.zip
* complex.c (nucomp_sub, nucomp_expt): call corresponding functions.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'complex.c')
-rw-r--r--complex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/complex.c b/complex.c
index 695342841..cdbd214d8 100644
--- a/complex.c
+++ b/complex.c
@@ -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]);
}
}
}