mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rational.c: remove f_negative_p
* rational.c (f_negative_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bdd18a2c31
commit
e7a7583029
1 changed files with 1 additions and 7 deletions
|
@ -160,12 +160,6 @@ fun2(idiv)
|
|||
|
||||
#define f_expt10(x) rb_int_pow(INT2FIX(10), x)
|
||||
|
||||
inline static int
|
||||
f_negative_p(VALUE x)
|
||||
{
|
||||
return rb_num_negative_p(x);
|
||||
}
|
||||
|
||||
inline static int
|
||||
f_zero_p(VALUE x)
|
||||
{
|
||||
|
@ -1010,7 +1004,7 @@ nurat_expt(VALUE self, VALUE other)
|
|||
return f_rational_new_bang1(CLASS_OF(self), INT2FIX(f_odd_p(other) ? -1 : 1));
|
||||
}
|
||||
else if (INT_ZERO_P(dat->num)) {
|
||||
if (f_negative_p(other)) {
|
||||
if (rb_num_negative_p(other)) {
|
||||
rb_num_zerodiv();
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue