mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Restore documentation for Object#hash [ci skip]
Object#hash documentation was removed (probably by accident) in
7b19e6f3fd
.
This commit is contained in:
parent
bd32833382
commit
6279cf8b2b
1 changed files with 19 additions and 0 deletions
19
object.c
19
object.c
|
@ -205,6 +205,25 @@ rb_obj_equal(VALUE obj1, VALUE obj2)
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* call-seq:
|
||||||
|
* obj.hash -> integer
|
||||||
|
*
|
||||||
|
* Generates an Integer hash value for this object. This function must have the
|
||||||
|
* property that <code>a.eql?(b)</code> implies <code>a.hash == b.hash</code>.
|
||||||
|
*
|
||||||
|
* The hash value is used along with #eql? by the Hash class to determine if
|
||||||
|
* two objects reference the same hash key. Any hash value that exceeds the
|
||||||
|
* capacity of an Integer will be truncated before being used.
|
||||||
|
*
|
||||||
|
* The hash value for an object may not be identical across invocations or
|
||||||
|
* implementations of Ruby. If you need a stable identifier across Ruby
|
||||||
|
* invocations and implementations you will need to generate one with a custom
|
||||||
|
* method.
|
||||||
|
*--
|
||||||
|
* \private
|
||||||
|
*++
|
||||||
|
*/
|
||||||
VALUE rb_obj_hash(VALUE obj);
|
VALUE rb_obj_hash(VALUE obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue