summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurdetteLamar <burdettelamar@yahoo.com>2025-12-15 20:35:27 +0000
committerPeter Zhu <peter@peterzhu.ca>2025-12-15 17:27:54 -0500
commitacbf55f4e6658f94e49f28b4df21ab0c29683c4b (patch)
tree32e6986b1df07f45637d120c5b220af18ebd7e05
parent7fbf321d23f3cc20988c80fae25ce131a5d1b231 (diff)
[DOC] Harmonize #- methods
-rw-r--r--complex.c4
-rw-r--r--numeric.c6
-rw-r--r--rational.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/complex.c b/complex.c
index c34c798a15..2a92f4c702 100644
--- a/complex.c
+++ b/complex.c
@@ -861,9 +861,9 @@ rb_complex_plus(VALUE self, VALUE other)
/*
* call-seq:
- * complex - numeric -> new_complex
+ * self - other -> complex
*
- * Returns the difference of +self+ and +numeric+:
+ * Returns the difference of +self+ and +other+:
*
* Complex.rect(2, 3) - Complex.rect(2, 3) # => (0+0i)
* Complex.rect(900) - Complex.rect(1) # => (899+0i)
diff --git a/numeric.c b/numeric.c
index cb3ca12904..5f2f4ea797 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1089,7 +1089,7 @@ rb_float_plus(VALUE x, VALUE y)
* call-seq:
* self - other -> numeric
*
- * Returns a new \Float which is the difference of +self+ and +other+:
+ * Returns the difference of +self+ and +other+:
*
* f = 3.14
* f - 1 # => 2.14
@@ -4197,9 +4197,9 @@ fix_minus(VALUE x, VALUE y)
/*
* call-seq:
- * self - numeric -> numeric_result
+ * self - other -> numeric
*
- * Performs subtraction:
+ * Returns the difference of +self+ and +other+:
*
* 4 - 2 # => 2
* -4 - 2 # => -6
diff --git a/rational.c b/rational.c
index 8c9b80cb62..f03a98a9ee 100644
--- a/rational.c
+++ b/rational.c
@@ -768,9 +768,9 @@ rb_rational_plus(VALUE self, VALUE other)
/*
* call-seq:
- * rat - numeric -> numeric
+ * self - other -> numeric
*
- * Performs subtraction.
+ * Returns the difference of +self+ and +other+:
*
* Rational(2, 3) - Rational(2, 3) #=> (0/1)
* Rational(900) - Rational(1) #=> (899/1)