From b27d06d30664c80600f832dd1f6cb653efa8ec1f Mon Sep 17 00:00:00 2001 From: usa Date: Wed, 25 Feb 2015 05:18:39 +0000 Subject: 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 --- ChangeLog | 5 +++++ string.c | 21 ++++++++++++--------- version.h | 6 +++--- 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 + + * 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 * 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 str (if present). If $/ has not been * changed from the default Ruby record separator, then chomp also * removes carriage return characters (that is it will remove \n, - * \r, and \r\n). - * - * "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" + * \r, and \r\n). If $/ 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" -- cgit v1.2.3