diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-12-15 20:20:25 +0000 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-12-15 17:27:24 -0500 |
| commit | 7fbf321d23f3cc20988c80fae25ce131a5d1b231 (patch) | |
| tree | 0c67d657e66eecc682a39fdd55ed4fd2d46b9e33 | |
| parent | 98ab418fed61079f8ef7e229ea1b41957ec5722b (diff) | |
[DOC] Harmonize #** methods
| -rw-r--r-- | complex.c | 4 | ||||
| -rw-r--r-- | numeric.c | 11 | ||||
| -rw-r--r-- | rational.c | 4 |
3 files changed, 9 insertions, 10 deletions
@@ -1122,9 +1122,9 @@ complex_pow_for_special_angle(VALUE self, VALUE other) /* * call-seq: - * complex ** numeric -> new_complex + * self ** exponent -> complex * - * Returns +self+ raised to power +numeric+: + * Returns +self+ raised to the power +exponent+: * * Complex.rect(0, 1) ** 2 # => (-1+0i) * Complex.rect(-8) ** Rational(1, 3) # => (1.0000000000000002+1.7320508075688772i) @@ -1390,9 +1390,9 @@ flo_divmod(VALUE x, VALUE y) /* * call-seq: - * self ** other -> numeric + * self ** exponent -> numeric * - * Raises +self+ to the power of +other+: + * Returns +self+ raised to the power +exponent+: * * f = 3.14 * f ** 2 # => 9.8596 @@ -4623,9 +4623,9 @@ rb_int_divmod(VALUE x, VALUE y) /* * call-seq: - * self ** numeric -> numeric_result + * self ** exponent -> numeric * - * Raises +self+ to the power of +numeric+: + * Returns +self+ raised to the power +exponent+: * * 2 ** 3 # => 8 * 2 ** -3 # => (1/8) @@ -4748,8 +4748,7 @@ fix_pow(VALUE x, VALUE y) * call-seq: * self ** exponent -> numeric * - * Returns the value of base +self+ raised to the power +exponent+; - * see {Exponentiation}[https://en.wikipedia.org/wiki/Exponentiation]: + * Returns +self+ raised to the power +exponent+: * * # Result for non-negative Integer exponent is Integer. * 2 ** 0 # => 1 diff --git a/rational.c b/rational.c index 7c2bd0b1eb..8c9b80cb62 100644 --- a/rational.c +++ b/rational.c @@ -984,9 +984,9 @@ nurat_fdiv(VALUE self, VALUE other) /* * call-seq: - * rat ** numeric -> numeric + * self ** exponent -> numeric * - * Performs exponentiation. + * Returns +self+ raised to the power +exponent+: * * Rational(2) ** Rational(3) #=> (8/1) * Rational(10) ** -2 #=> (1/100) |
