summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2021-07-27 09:20:24 +0900
committerNobuyoshi Nakada <[email protected]>2021-07-27 15:40:27 +0900
commit6329da588b5a27834e3a73c1e08bf54356033757 ()
treececa7e3b052acedcde7fa2e7a6f9d14571846a10 /rational.c
parent0754cc4888bf96c77504c385d7aab0068202aa8f (diff)
Use predefined IDs
Notes: Merged: https://.com/ruby/ruby/pull/4684
-rw-r--r--rational.c4
1 files changed, 2 insertions, 2 deletions
@@ -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("**"));
}
}
#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("<=>"));
}
}