[前][次][番号順一覧][スレッド一覧]

ruby-changes:39447

From: hsbt <ko1@a...>
Date: Tue, 11 Aug 2015 10:58:53 +0900 (JST)
Subject: [ruby-changes:39447] hsbt:r51528 (trunk): * string.c: [DOC] Make #end_with? example doc symmetry

hsbt	2015-08-11 10:58:47 +0900 (Tue, 11 Aug 2015)

  New Revision: 51528

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=51528

  Log:
    * string.c: [DOC] Make #end_with? example doc symmetry
      with #start_with? [fix GH-992][ci skip]

  Modified files:
    trunk/ChangeLog
    trunk/string.c
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 51527)
+++ ChangeLog	(revision 51528)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Tue Aug 11 10:58:42 2015  Juanito Fatas  <juanitofatas@g...>
+
+	* string.c: [DOC] Make #end_with? example doc symmetry
+	  with #start_with? [fix GH-992][ci skip]
+
 Tue Aug 11 10:51:19 2015  SHIBATA Hiroshi  <hsbt@r...>
 
 	* test/ruby/test_array.rb: Add test for `Array#flatten` with level 1
Index: string.c
===================================================================
--- string.c	(revision 51527)
+++ string.c	(revision 51528)
@@ -8219,6 +8219,12 @@ rb_str_start_with(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/string.c#L8219
  *     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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]