summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-25 05:18:39 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-25 05:18:39 +0000
commitb27d06d30664c80600f832dd1f6cb653efa8ec1f (patch)
tree65d967f66566eb43384c2df0fc7c0d21f3211eba
parent4e1bea5f5a46ff4c1a067ec280edc5f3da020a3a (diff)
merge revision(s) 48747: [Backport #10582]
* string.c: [DOC] Add missing documentation around String#chomp. Patchby @stderr [ci skip][fix GH-780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_0_0@49733 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--string.c21
-rw-r--r--version.h6
3 files changed, 20 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ff20ea7ef..d192ce1dc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Feb 25 14:18:26 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
+
+ * string.c: [DOC] Add missing documentation around String#chomp.
+ Patchby @stderr [ci skip][fix GH-780]
+
Sat Feb 21 09:48:48 2015 NARUSE, Yui <naruse@ruby-lang.org>
* lib/uri/generic.rb (URI::Generic.build):
diff --git a/string.c b/string.c
index 81e78576ad..c675331c74 100644
--- a/string.c
+++ b/string.c
@@ -6817,15 +6817,18 @@ rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
* 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>).
- *
- * "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"
+ * <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\r\n\r\n".chomp('') #=> "hello"
+ * "hello\r\n\r\r\n".chomp('') #=> "hello\r\n\r"
*/
static VALUE
diff --git a/version.h b/version.h
index f9ea8f0fd5..543aa6821f 100644
--- a/version.h
+++ b/version.h
@@ -1,10 +1,10 @@
#define RUBY_VERSION "2.0.0"
-#define RUBY_RELEASE_DATE "2015-02-21"
-#define RUBY_PATCHLEVEL 635
+#define RUBY_RELEASE_DATE "2015-02-25"
+#define RUBY_PATCHLEVEL 636
#define RUBY_RELEASE_YEAR 2015
#define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 21
+#define RUBY_RELEASE_DAY 25
#include "ruby/version.h"