Use predefined IDs

This commit is contained in:
Nobuyoshi Nakada 2021-07-27 09:20:24 +09:00
parent 0754cc4888
commit 6329da588b
Notes: git 2021-07-27 15:40:54 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -1043,7 +1043,7 @@ rb_rational_pow(VALUE self, VALUE other)
return rb_float_pow(nurat_to_f(self), other);
}
else {
return rb_num_coerce_bin(self, other, rb_intern("**"));
return rb_num_coerce_bin(self, other, idPow);
}
}
#define nurat_expt rb_rational_pow
@ -1102,7 +1102,7 @@ rb_rational_cmp(VALUE self, VALUE other)
return rb_dbl_cmp(nurat_to_double(self), RFLOAT_VALUE(other));
default:
return rb_num_coerce_cmp(self, other, rb_intern("<=>"));
return rb_num_coerce_cmp(self, other, idCmp);
}
}