summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-05-30 09:34:32 (GMT)
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-07-01 13:41:15 (GMT)
commit254bed302752a401b5fcc3b6c65a9c93711d91d6 (patch)
tree7306701d64687caef2e5712c232ca82353d2872c /rational.c
parent53d2bfd540c1c9b1038c0b1150b2f397e54b0322 (diff)
Renamed `nurat_sub` compliant with `rb_rational_plus`
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rational.c b/rational.c
index 1a95afd..02c9003 100644
--- a/rational.c
+++ b/rational.c
@@ -771,8 +771,8 @@ rb_rational_plus(VALUE self, VALUE other)
* Rational(9, 8) - 4 #=> (-23/8)
* Rational(20, 9) - 9.8 #=> -7.577777777777778
*/
-static VALUE
-nurat_sub(VALUE self, VALUE other)
+VALUE
+rb_rational_minus(VALUE self, VALUE other)
{
if (RB_INTEGER_TYPE_P(other)) {
{
@@ -2731,7 +2731,7 @@ Init_Rational(void)
rb_define_method(rb_cRational, "-@", rb_rational_uminus, 0);
rb_define_method(rb_cRational, "+", rb_rational_plus, 1);
- rb_define_method(rb_cRational, "-", nurat_sub, 1);
+ rb_define_method(rb_cRational, "-", rb_rational_minus, 1);
rb_define_method(rb_cRational, "*", rb_rational_mul, 1);
rb_define_method(rb_cRational, "/", nurat_div, 1);
rb_define_method(rb_cRational, "quo", nurat_div, 1);