summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authorhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 01:58:47 (GMT)
committerhsbt <hsbt@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-08-11 01:58:47 (GMT)
commit8322c36a9bb55a50faf03ffaf23e0ebf08f71e30 (patch)
tree172731ae80fe7e92f0f8aa8711b94f5b75df619a /string.c
parenta6cf2a94124ccd99f01f02d50c397a5285965187 (diff)
* string.c: [DOC] Make #end_with? example doc symmetry
with #start_with? [fix GH-992][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/string.c b/string.c
index 57ab6da..427e3aa 100644
--- a/string.c
+++ b/string.c
@@ -8219,6 +8219,12 @@ rb_str_start_with(int argc, VALUE *argv, VALUE str)
* str.end_with?([suffixes]+) -> true or false
*
* Returns true if +str+ ends with one of the +suffixes+ given.
+ *
+ * "hello".end_with?("ello") #=> true
+ *
+ * # returns true if one of the +suffixes+ matches.
+ * "hello".end_with?("heaven", "ello") #=> true
+ * "hello".end_with?("heaven", "paradise") #=> false
*/
static VALUE