зеркало из https://github.com/github/ruby.git
[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.
This commit is contained in:
Родитель
5d43969e92
Коммит
0bca029d2f
12
compar.c
12
compar.c
|
@ -288,15 +288,11 @@ cmp_clamp(int argc, VALUE *argv, VALUE x)
|
||||||
*
|
*
|
||||||
* \Module \Comparable provides these methods, all of which use method <tt><=></tt>:
|
* \Module \Comparable provides these methods, all of which use method <tt><=></tt>:
|
||||||
*
|
*
|
||||||
* - {<}[Comparable.html#method-i-3C]:
|
* - #<: Returns whether +self+ is less than the given object.
|
||||||
* Returns whether +self+ is less than the given object.
|
* - #<=: Returns whether +self+ is less than or equal to the given object.
|
||||||
* - {<=}[Comparable.html#method-i-3C-3D]:
|
|
||||||
* Returns whether +self+ is less than or equal to the given object.
|
|
||||||
* - #==: Returns whether +self+ is equal to the given object.
|
* - #==: Returns whether +self+ is equal to the given object.
|
||||||
* - {>}[Comparable.html#method-i-3E]:
|
* - #>: Returns whether +self+ is greater than or equal to the given object.
|
||||||
* Returns whether +self+ is greater than or equal to the given object.
|
* - #>=: Returns whether +self+ is greater than the given object.
|
||||||
* - {>=}[Comparable.html#method-i-3E-3D]:
|
|
||||||
* Returns whether +self+ is greater than the given object.
|
|
||||||
* - #between?: Returns +true+ if +self+ is between two given objects.
|
* - #between?: Returns +true+ if +self+ is between two given objects.
|
||||||
* - #clamp: For given objects +min+ and +max+, or range <tt>(min..max)</tt>, returns:
|
* - #clamp: For given objects +min+ and +max+, or range <tt>(min..max)</tt>, returns:
|
||||||
*
|
*
|
||||||
|
|
8
object.c
8
object.c
|
@ -4195,8 +4195,8 @@ f_sprintf(int c, const VALUE *v, VALUE _)
|
||||||
* These are the methods defined for \BasicObject:
|
* These are the methods defined for \BasicObject:
|
||||||
*
|
*
|
||||||
* - ::new: Returns a new \BasicObject instance.
|
* - ::new: Returns a new \BasicObject instance.
|
||||||
* - {!}[#method-i-21]: Returns the boolean negation of +self+: +true+ or +false+.
|
* - #!: Returns the boolean negation of +self+: +true+ or +false+.
|
||||||
* - {!=}[#method-i-21-3D]: Returns whether +self+ and the given object are _not_ equal.
|
* - #!=: Returns whether +self+ and the given object are _not_ equal.
|
||||||
* - #==: Returns whether +self+ and the given object are equivalent.
|
* - #==: Returns whether +self+ and the given object are equivalent.
|
||||||
* - {__id__}[#method-i-__id__]: Returns the integer object identifier for +self+.
|
* - {__id__}[#method-i-__id__]: Returns the integer object identifier for +self+.
|
||||||
* - {__send__}[#method-i-__send__]: Calls the method identified by the given symbol.
|
* - {__send__}[#method-i-__send__]: Calls the method identified by the given symbol.
|
||||||
|
@ -4240,9 +4240,9 @@ f_sprintf(int c, const VALUE *v, VALUE _)
|
||||||
*
|
*
|
||||||
* === Querying
|
* === Querying
|
||||||
*
|
*
|
||||||
* - {!~}[#method-i-21~]: Returns +true+ if +self+ does not match the given object,
|
* - #!~: Returns +true+ if +self+ does not match the given object,
|
||||||
* otherwise +false+.
|
* otherwise +false+.
|
||||||
* - {<=>}[#method-i-3C-3D-3E]: Returns 0 if +self+ and the given object +object+ are the same
|
* - #<=>: Returns 0 if +self+ and the given object +object+ are the same
|
||||||
* object, or if <tt>self == object</tt>; otherwise returns +nil+.
|
* object, or if <tt>self == object</tt>; otherwise returns +nil+.
|
||||||
* - #===: Implements case equality, effectively the same as calling #==.
|
* - #===: Implements case equality, effectively the same as calling #==.
|
||||||
* - #eql?: Implements hash equality, effectively the same as calling #==.
|
* - #eql?: Implements hash equality, effectively the same as calling #==.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче