Skip to content

Commit 51e8c81

Browse files
committed
merge revision(s) r48747,r48772: [Backport ruby#10582]
* string.c: [DOC] Add missing documentation around String#chomp. Patch by @stderr [ci skip][fix rubyGH-780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@49911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 38117a8 commit 51e8c81

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Tue Mar 10 02:37:55 2015 SHIBATA Hiroshi <[email protected]>
2+
3+
* string.c: [DOC] Add missing documentation around String#chomp.
4+
Patch by @stderr [ci skip][fix GH-780]
5+
16
Mon Mar 9 22:30:50 2015 SHIBATA Hiroshi <[email protected]>
27

38
* spec/default.mspec: use default configuration file name.

string.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7058,15 +7058,18 @@ rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
70587058
* from the end of <i>str</i> (if present). If <code>$/</code> has not been
70597059
* changed from the default Ruby record separator, then <code>chomp</code> also
70607060
* removes carriage return characters (that is it will remove <code>\n</code>,
7061-
* <code>\r</code>, and <code>\r\n</code>).
7062-
*
7063-
* "hello".chomp #=> "hello"
7064-
* "hello\n".chomp #=> "hello"
7065-
* "hello\r\n".chomp #=> "hello"
7066-
* "hello\n\r".chomp #=> "hello\n"
7067-
* "hello\r".chomp #=> "hello"
7068-
* "hello \n there".chomp #=> "hello \n there"
7069-
* "hello".chomp("llo") #=> "he"
7061+
* <code>\r</code>, and <code>\r\n</code>). If <code>$/</code> is an empty string,
7062+
* it will remove all trailing newlines from the string.
7063+
*
7064+
* "hello".chomp #=> "hello"
7065+
* "hello\n".chomp #=> "hello"
7066+
* "hello\r\n".chomp #=> "hello"
7067+
* "hello\n\r".chomp #=> "hello\n"
7068+
* "hello\r".chomp #=> "hello"
7069+
* "hello \n there".chomp #=> "hello \n there"
7070+
* "hello".chomp("llo") #=> "he"
7071+
* "hello\r\n\r\n".chomp('') #=> "hello"
7072+
* "hello\r\n\r\r\n".chomp('') #=> "hello\r\n\r"
70707073
*/
70717074

70727075
static VALUE

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#define RUBY_VERSION "2.1.5"
22
#define RUBY_RELEASE_DATE "2015-03-10"
3-
#define RUBY_PATCHLEVEL 310
3+
#define RUBY_PATCHLEVEL 311
44

55
#define RUBY_RELEASE_YEAR 2015
66
#define RUBY_RELEASE_MONTH 3

0 commit comments

Comments
 (0)