summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-07 00:02:17 +0000
committerzzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-08-07 00:02:17 +0000
commitaa66f59c97bfdf53e7232d8cf9aa5bd2335666df (patch)
treee9d3dcc6eae8a3a5285f114ba47b281cfd4563f9 /string.c
parentaecd5b67d50705511e565ac0dc2290c27279fda4 (diff)
* string.c: [DOC] Description of rb_str_equal [Fixes GH-375]
Based on a patch by @markijbema https://github.com/ruby/ruby/pull/375 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/string.c b/string.c
index b85fb5d960..81a368f4e5 100644
--- a/string.c
+++ b/string.c
@@ -2400,9 +2400,14 @@ str_eql(const VALUE str1, const VALUE str2)
* str == obj -> true or false
* str === obj -> true or false
*
- * Equality---If <i>obj</i> is not a <code>String</code>, returns
- * <code>false</code>. Otherwise, returns <code>true</code> if <i>str</i>
- * <code><=></code> <i>obj</i> returns zero.
+ * === Equality
+ *
+ * Returns whether +str+ == +obj+, similar to Object#==.
+ *
+ * If +obj+ is not an instance of String but responds to +to_str+, then the
+ * two strings are compared using case equality Object#===.
+ *
+ * Otherwise, returns similarly to String#eql?, comparing length and content.
*/
VALUE