[#67346] Future of test suites for Ruby — Charles Oliver Nutter <headius@...>

I'll try to be brief so we can discuss all this. tl;dr: RubySpec is

19 messages 2015/01/05

[ruby-core:67837] [ruby-trunk - Bug #10582] [Closed] String#chomp strips off more newlines than its documentation states

From: shibata.hiroshi@...
Date: 2015-01-27 12:20:26 UTC
List: ruby-core #67837
Issue #10582 has been updated by Hiroshi SHIBATA.

File 780.patch added
Status changed from Assigned to Closed
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONTNEED

----------------------------------------
Bug #10582: String#chomp strips off more newlines than its documentation states
https://bugs.ruby-lang.org/issues/10582#change-51245

* Author: Alex Boyd
* Status: Closed
* Priority: Normal
* Assignee: Zachary Scott
* ruby -v: ruby 2.2.0dev (2014-12-04 trunk 48708) [x86_64-darwin14]
* Backport: 2.0.0: UNKNOWN, 2.1: REQUIRED, 2.2: DONTNEED
----------------------------------------
Given an empty string as its parameter, String#chomp strips off as many trailing newlines as are present, plus a preceding carriage return if one exists:

~~~
irb(main):001:0> "foo\n\n\n".chomp
=> "foo\n\n"
irb(main):002:0> "foo\n\n\n".chomp ''
=> "foo"
irb(main):003:0> "foo\r\n\n\n".chomp ''
=> "foo"
~~~

This should either be mentioned as part of String#chomp's documentation, or removed.

---Files--------------------------------
780.patch (1.79 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next