diff options
author | Ketan Bhatt <[email protected]> | 2021-05-13 10:28:51 +0100 |
---|---|---|
committer | Jeremy Evans <[email protected]> | 2021-06-23 07:42:02 -0700 |
commit | 2fb435b3ab19bab644083c6eaf7ff06ce5b01841 (patch) | |
tree | 051032d0b01e74f550735534165cd6e84b6a7244 /string.c | |
parent | 7c31ecd3accd75d164b4f87b0651b47f31da286d (diff) |
Add Related link from String#hash to Object#hash
We came across a bug in our code because we assumed `String#hash` to be consistent across Ruby processes, which was incorrect.
Our search lead us to `Object#hash` which has the right warning that `String#hash` doesn't. We also noticed that a previous version of the documentation for `String#hash` pointed to `Object#hash` that was removed by https://github.com/ruby/ruby/pull/3565.
We think this removal might not be intended and just got missed amidst other changes.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4498
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -3311,6 +3311,8 @@ rb_str_hash_cmp(VALUE str1, VALUE str2) * * Returns the integer hash value for +self+. * The value is based on the length, content and encoding of +self+. + * + * Related: Object#hash */ static VALUE |