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

ruby-changes:37830

From: nagachika <ko1@a...>
Date: Tue, 10 Mar 2015 02:38:41 +0900 (JST)
Subject: [ruby-changes:37830] nagachika:r49911 (ruby_2_1): merge revision(s) r48747, r48772: [Backport #10582]

nagachika	2015-03-10 02:38:28 +0900 (Tue, 10 Mar 2015)

  New Revision: 49911

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

  Log:
    merge revision(s) r48747,r48772: [Backport #10582]
    
    * string.c: [DOC] Add missing documentation around String#chomp.
      Patch by @stderr [ci skip][fix GH-780]

  Modified directories:
    branches/ruby_2_1/
  Modified files:
    branches/ruby_2_1/ChangeLog
    branches/ruby_2_1/string.c
    branches/ruby_2_1/version.h
Index: ruby_2_1/ChangeLog
===================================================================
--- ruby_2_1/ChangeLog	(revision 49910)
+++ ruby_2_1/ChangeLog	(revision 49911)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/ChangeLog#L1
+Tue Mar 10 02:37:55 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
+
+	* string.c: [DOC] Add missing documentation around String#chomp.
+	  Patch by @stderr [ci skip][fix GH-780]
+
 Mon Mar  9 22:30:50 2015  SHIBATA Hiroshi  <shibata.hiroshi@g...>
 
 	* spec/default.mspec: use default configuration file name.
Index: ruby_2_1/string.c
===================================================================
--- ruby_2_1/string.c	(revision 49910)
+++ ruby_2_1/string.c	(revision 49911)
@@ -7058,15 +7058,18 @@ rb_str_chomp_bang(int argc, VALUE *argv, https://github.com/ruby/ruby/blob/trunk/ruby_2_1/string.c#L7058
  *  from the end of <i>str</i> (if present). If <code>$/</code> has not been
  *  changed from the default Ruby record separator, then <code>chomp</code> also
  *  removes carriage return characters (that is it will remove <code>\n</code>,
- *  <code>\r</code>, and <code>\r\n</code>).
+ *  <code>\r</code>, and <code>\r\n</code>). If <code>$/</code> is an empty string,
+ *  it will remove all trailing newlines from the string.
  *
- *     "hello".chomp            #=> "hello"
- *     "hello\n".chomp          #=> "hello"
- *     "hello\r\n".chomp        #=> "hello"
- *     "hello\n\r".chomp        #=> "hello\n"
- *     "hello\r".chomp          #=> "hello"
- *     "hello \n there".chomp   #=> "hello \n there"
- *     "hello".chomp("llo")     #=> "he"
+ *     "hello".chomp                #=> "hello"
+ *     "hello\n".chomp              #=> "hello"
+ *     "hello\r\n".chomp            #=> "hello"
+ *     "hello\n\r".chomp            #=> "hello\n"
+ *     "hello\r".chomp              #=> "hello"
+ *     "hello \n there".chomp       #=> "hello \n there"
+ *     "hello".chomp("llo")         #=> "he"
+ *     "hello\r\n\r\n".chomp('')    #=> "hello"
+ *     "hello\r\n\r\r\n".chomp('')  #=> "hello\r\n\r"
  */
 
 static VALUE
Index: ruby_2_1/version.h
===================================================================
--- ruby_2_1/version.h	(revision 49910)
+++ ruby_2_1/version.h	(revision 49911)
@@ -1,6 +1,6 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_1/version.h#L1
 #define RUBY_VERSION "2.1.5"
 #define RUBY_RELEASE_DATE "2015-03-10"
-#define RUBY_PATCHLEVEL 310
+#define RUBY_PATCHLEVEL 311
 
 #define RUBY_RELEASE_YEAR 2015
 #define RUBY_RELEASE_MONTH 3

Property changes on: ruby_2_1
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /trunk:r48747,48772


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

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