[#84280] [Ruby trunk Bug#14181] hangs or deadlocks from waitpid, threads, and trapping SIGCHLD — nobu@...
Issue #14181 has been updated by nobu (Nobuyoshi Nakada).
3 messages
2017/12/15
[#84398] [Ruby trunk Bug#14220] WEBrick changes - failures on MSWIN, MinGW — Greg.mpls@...
Issue #14220 has been reported by MSP-Greg (Greg L).
3 messages
2017/12/22
[#84472] Re: [ruby-dev:50394] [Ruby trunk Bug#14240] warn four special variables: $; $, $/ $\ — Eric Wong <normalperson@...>
Shouldn't English posts be on ruby-core instead of ruby-dev?
3 messages
2017/12/26
[ruby-core:84555] [Ruby trunk Bug#14257] the chomp option removes newlines in additon to the provided separator for String#each_line and String#lines
From:
shevegen@...
Date:
2017-12-29 10:37:26 UTC
List:
ruby-core #84555
Issue #14257 has been updated by shevegen (Robert A. Heiler).
I wanted to have a look but to my surprise, the documentation at:
https://ruby-doc.org/core-2.5.0/String.html#method-i-lines
does not seem to indicate more than one agument to this method?
Either way, could someone perhaps add a few examples to this
method, on the documentation, perhaps also including the
lines(' ', chomp: true) variant? Because as it presently is,
I can't seem to find the chomp: true part. Perhaps it was added
only somewhat recently.
----------------------------------------
Bug #14257: the chomp option removes newlines in additon to the provided separator for String#each_line and String#lines
https://bugs.ruby-lang.org/issues/14257#change-69090
* Author: AaronLasseigne (Aaron Lasseigne)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: 2.5.0
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
I'm not entirely sure this is a bug but I had a hard time finding anything that indicated that the change was on purpose.
The `chomp` option would remove the provided separator from each line. Now it does that and it also removes newlines.
2.4
~~~ ruby
> "a b c d\n".lines(' ', chomp: true)
=> ["a", "b", "c", "d\n"]
~~~
2.5
~~~ ruby
> "a b c d\n".lines(' ', chomp: true)
=> ["a", "b", "c", "d"]
~~~
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>