aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-14 01:27:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-03-14 01:27:43 +0000
commitfc23374f060722b944b89da264a58406bd4cefb2 (patch)
tree4c421f333625d6881a412d89ad36312e2085edc5
parentf53c291ab26dd9b8fac964a038b35405f1045297 (diff)
downloadruby-fc23374f060722b944b89da264a58406bd4cefb2.tar.gz
[DOC] add links to `Object#hash`
add links to `Object#hash` to each #`hash` methods rdocs. [Fixes GH-567] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45329 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--array.c2
-rw-r--r--bignum.c2
-rw-r--r--gc.c2
-rw-r--r--hash.c2
-rw-r--r--numeric.c2
-rw-r--r--proc.c4
-rw-r--r--range.c2
-rw-r--r--re.c4
-rw-r--r--string.c2
-rw-r--r--struct.c2
-rw-r--r--time.c2
11 files changed, 26 insertions, 0 deletions
diff --git a/array.c b/array.c
index 5cf995c303..7249ed7112 100644
--- a/array.c
+++ b/array.c
@@ -3796,6 +3796,8 @@ rb_ary_eql(VALUE ary1, VALUE ary2)
*
* Two arrays with the same content will have the same hash code (and will
* compare using #eql?).
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/bignum.c b/bignum.c
index cc9f16375f..11f5151652 100644
--- a/bignum.c
+++ b/bignum.c
@@ -6782,6 +6782,8 @@ rb_big_aref(VALUE x, VALUE y)
* big.hash -> fixnum
*
* Compute a hash based on the value of _big_.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/gc.c b/gc.c
index 9a6a8c7eef..fdc388f3a3 100644
--- a/gc.c
+++ b/gc.c
@@ -2375,6 +2375,8 @@ id2ref(VALUE obj, VALUE objid)
*
* Any hash value that exceeds the capacity of a Fixnum will be truncated
* before being used.
+ *
+ * See also Object#hash.
*/
VALUE
diff --git a/hash.c b/hash.c
index ccc0d448f1..0023e84b1a 100644
--- a/hash.c
+++ b/hash.c
@@ -2010,6 +2010,8 @@ hash_i(VALUE key, VALUE val, VALUE arg)
*
* Compute a hash-code for this hash. Two hashes with the same content
* will have the same hash code (and will compare using <code>eql?</code>).
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/numeric.c b/numeric.c
index d0424c0275..0c84c49332 100644
--- a/numeric.c
+++ b/numeric.c
@@ -1107,6 +1107,8 @@ flo_eq(VALUE x, VALUE y)
* float.hash -> integer
*
* Returns a hash code for this float.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/proc.c b/proc.c
index 4b7f15a468..db4c327b7a 100644
--- a/proc.c
+++ b/proc.c
@@ -1067,6 +1067,8 @@ rb_hash_proc(st_index_t hash, VALUE prc)
* prc.hash -> integer
*
* Returns a hash value corresponding to proc body.
+ *
+ * See also Object#hash.
*/
static VALUE
@@ -1347,6 +1349,8 @@ method_eq(VALUE method, VALUE other)
* meth.hash -> integer
*
* Returns a hash value corresponding to the method object.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/range.c b/range.c
index f522a8ae41..b4a2bd40ed 100644
--- a/range.c
+++ b/range.c
@@ -250,6 +250,8 @@ range_eql(VALUE range, VALUE obj)
* Compute a hash-code for this range. Two ranges with equal
* begin and end points (using <code>eql?</code>), and the same
* #exclude_end? value will generate the same hash-code.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/re.c b/re.c
index d7ffeb040c..106cf593ac 100644
--- a/re.c
+++ b/re.c
@@ -2583,6 +2583,8 @@ static st_index_t reg_hash(VALUE re);
* rxp.hash -> fixnum
*
* Produce a hash based on the text and options of this regular expression.
+ *
+ * See also Object#hash.
*/
static VALUE
@@ -2641,6 +2643,8 @@ rb_reg_equal(VALUE re1, VALUE re2)
*
* Produce a hash based on the target string, regexp and matched
* positions of this matchdata.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/string.c b/string.c
index d41a5314e1..075876f47a 100644
--- a/string.c
+++ b/string.c
@@ -2338,6 +2338,8 @@ rb_str_hash_cmp(VALUE str1, VALUE str2)
* str.hash -> fixnum
*
* Return a hash based on the string's length, content and encoding.
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/struct.c b/struct.c
index c06b0c51fa..c3dba62962 100644
--- a/struct.c
+++ b/struct.c
@@ -949,6 +949,8 @@ rb_struct_equal(VALUE s, VALUE s2)
* struct.hash -> fixnum
*
* Returns a hash value based on this struct's contents (see Object#hash).
+ *
+ * See also Object#hash.
*/
static VALUE
diff --git a/time.c b/time.c
index 87ac0d3ce2..9db276ed82 100644
--- a/time.c
+++ b/time.c
@@ -3405,6 +3405,8 @@ time_utc_p(VALUE time)
* time.hash -> fixnum
*
* Returns a hash code for this Time object.
+ *
+ * See also Object#hash.
*/
static VALUE