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

* rational.c (nurat_expt): use f_rational_new2. [ruby-dev:34524]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tadf 2008-04-27 10:02:19 +00:00
parent 3de80833a2
commit de999ae1fc
2 changed files with 5 additions and 5 deletions

View file

@ -1,3 +1,7 @@
Sun Apr 27 18:59:04 2008 Tadayoshi Funaba <tadf@dotrb.org>
* rational.c (nurat_expt): use f_rational_new2. [ruby-dev:34524]
Sun Apr 27 15:23:40 2008 Koichi Sasada <ko1@atdot.net>
* gc.c (gc_count): add a GC.count method. This method returns

View file

@ -860,11 +860,7 @@ nurat_expt(VALUE self, VALUE other)
den = ONE;
break;
}
if (f_negative_p(den)) { /* or use normal new */
num = f_negate(num);
den = f_negate(den);
}
return f_rational_new_bang2(CLASS_OF(self), num, den);
return f_rational_new2(CLASS_OF(self), num, den);
}
case T_FLOAT:
case T_RATIONAL: