Skip to content

Commit 7913aff

Browse files
committed
[DOC] Fix return value of rb_str_hash_cmp
rb_str_hash_cmp returns 0 if the two strings are identical and 1 if they are different.
1 parent d0bb17e commit 7913aff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/ruby/internal/intern/string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,8 @@ st_index_t rb_str_hash(VALUE str);
970970
*
971971
* @param[in] str1 A string.
972972
* @param[in] str2 Another string.
973-
* @retval 1 They have identical contents, length, and encodings.
974-
* @retval 0 Otherwise.
973+
* @retval 0 They have identical contents, length, and encodings.
974+
* @retval 1 Otherwise.
975975
* @pre Both objects must not be any arbitrary objects except
976976
* ::RString.
977977
*

0 commit comments

Comments
 (0)