From 300f4677c93fb7ce312bba27e50b0af51ce8ba2e Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 26 Mar 2022 21:07:06 +0900 Subject: [DOC] Use simple references to operator methods Method references is not only able to be marked up as code, also reflects `--show-hash` option. The bug that prevented the old rdoc from correctly parsing these methods was fixed last month. --- numeric.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'numeric.c') diff --git a/numeric.c b/numeric.c index ce9537d8d6..91f8c2bd87 100644 --- a/numeric.c +++ b/numeric.c @@ -975,14 +975,14 @@ num_negative_p(VALUE num) * * === Comparing * - * - {<}[#method-i-3C]: Returns whether +self+ is less than the given value. - * - {<=}[#method-i-3C-3D]: Returns whether +self+ is less than or equal to the given value. - * - {<=>}[#method-i-3C-3D-3E]: Returns a number indicating whether +self+ is less than, equal + * - #<: Returns whether +self+ is less than the given value. + * - #<=: Returns whether +self+ is less than or equal to the given value. + * - #<=>: Returns a number indicating whether +self+ is less than, equal * to, or greater than the given value. * - #== (aliased as #=== and #eql?): Returns whether +self+ is equal to * the given value. - * - {>}[#method-i-3E]: Returns whether +self+ is greater than the given value. - * - {>=}[#method-i-3E-3D]: Returns whether +self+ is greater than or equal to the given value. + * - #>: Returns whether +self+ is greater than the given value. + * - #>=: Returns whether +self+ is greater than or equal to the given value. * * === Converting * @@ -991,7 +991,7 @@ num_negative_p(VALUE num) * - #**: Returns the value of +self+ raised to the power of the given value. * - #+: Returns the sum of +self+ and the given value. * - #-: Returns the difference of +self+ and the given value. - * - {/}[#method-i-2F]: Returns the quotient of +self+ and the given value. + * - #/: Returns the quotient of +self+ and the given value. * - #ceil: Returns the smallest number greater than or equal to +self+. * - #coerce: Returns a 2-element array containing the given value converted to a \Float and +self+ @@ -3510,30 +3510,30 @@ rb_num2ull(VALUE val) * * === Comparing * - * - {<}[#method-i-3C]: Returns whether +self+ is less than the given value. - * - {<=}[#method-i-3C-3D]: Returns whether +self+ is less than or equal to the given value. - * - {<=>}[#method-i-3C-3D-3E]: Returns a number indicating whether +self+ is less than, equal + * - #<: Returns whether +self+ is less than the given value. + * - #<=: Returns whether +self+ is less than or equal to the given value. + * - #<=>: Returns a number indicating whether +self+ is less than, equal * to, or greater than the given value. * - #== (aliased as #===): Returns whether +self+ is equal to the given * value. - * - {>}[#method-i-3E]: Returns whether +self+ is greater than the given value. - * - {>=}[#method-i-3E-3D]: Returns whether +self+ is greater than or equal to the given value. + * - #>: Returns whether +self+ is greater than the given value. + * - #>=: Returns whether +self+ is greater than or equal to the given value. * * === Converting * * - ::sqrt: Returns the integer square root of the given value. * - ::try_convert: Returns the given value converted to an \Integer. * - #% (aliased as #modulo): Returns +self+ modulo the given value. - * - {&}[#method-i-26]: Returns the bitwise AND of +self+ and the given value. + * - #&: Returns the bitwise AND of +self+ and the given value. * - #*: Returns the product of +self+ and the given value. * - #**: Returns the value of +self+ raised to the power of the given value. * - #+: Returns the sum of +self+ and the given value. * - #-: Returns the difference of +self+ and the given value. - * - {/}[#method-i-2F]: Returns the quotient of +self+ and the given value. + * - #/: Returns the quotient of +self+ and the given value. * - #<<: Returns the value of +self+ after a leftward bit-shift. * - #>>: Returns the value of +self+ after a rightward bit-shift. * - #[]: Returns a slice of bits from +self+. - * - {^}[#method-i-5E]: Returns the bitwise EXCLUSIVE OR of +self+ and the given value. + * - #^: Returns the bitwise EXCLUSIVE OR of +self+ and the given value. * - #ceil: Returns the smallest number greater than or equal to +self+. * - #chr: Returns a 1-character string containing the character * represented by the value of +self+. @@ -3553,7 +3553,7 @@ rb_num2ull(VALUE val) * - #to_s (aliased as #inspect): Returns a string containing the place-value * representation of +self+ in the given radix. * - #truncate: Returns +self+ truncated to the given precision. - * - {|}[#method-i-7C]: Returns the bitwise OR of +self+ and the given value. + * - #|: Returns the bitwise OR of +self+ and the given value. * * === Other * @@ -6119,7 +6119,7 @@ int_s_try_convert(VALUE self, VALUE num) * * === Comparing * - * - {<=>}[#method-i-3C-3D-3E]: Returns: + * - #<=>: Returns: * * - -1 if +self+ is less than the given value. * - 0 if +self+ is equal to the given value. -- cgit v1.2.1