[#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
[#67353] Re: Future of test suites for Ruby
— Tanaka Akira <akr@...>
2015/01/05
2015-01-06 7:18 GMT+09:00 Charles Oliver Nutter <headius@headius.com>:
[#67444] [ruby-trunk - Feature #10718] [Open] IO#close should not raise IOError on closed IO objects. — akr@...
Issue #10718 has been reported by Akira Tanaka.
3 messages
2015/01/09
[#67689] Keyword Arguments — Anthony Crumley <anthony.crumley@...>
Please forgive my ignorance as I am new to MRI development and am still
5 messages
2015/01/20
[#67733] [ruby-trunk - Bug #10761] Marshal.dump 100% slower in 2.2.0 vs 2.1.5 — normalperson@...
Issue #10761 has been updated by Eric Wong.
4 messages
2015/01/21
[#67736] Re: [ruby-trunk - Bug #10761] Marshal.dump 100% slower in 2.2.0 vs 2.1.5
— Eric Wong <normalperson@...>
2015/01/22
normalperson@yhbt.net wrote:
[#67772] Preventing Redundant Email Messages — Jeremy Evans <code@...>
For a long time, I've wondered why I sometimes receive redundant email
5 messages
2015/01/23
[ruby-core:67316] [ruby-trunk - Bug #10476] [Closed] String.strip remove characters different than pure whitespace
From:
ayumu.aizawa@...
Date:
2015-01-04 03:37:25 UTC
List:
ruby-core #67316
Issue #10476 has been updated by Ayumu AIZAWA.
Status changed from Assigned to Closed
% Done changed from 0 to 100
Applied in changeset r49135.
----------
* string.c: improve docs for String#strip and variations. [ruby-core:66081][Bug #10476]
----------------------------------------
Bug #10476: String.strip remove characters different than pure whitespace
https://bugs.ruby-lang.org/issues/10476#change-50775
* Author: Yves Le Douaron
* Status: Closed
* Priority: Normal
* Assignee: Zachary Scott
* Category: doc
* Target version: current: 2.2.0
* ruby -v: ruby 2.1.3p242
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
The offical documentation (http://www.ruby-doc.org/core-2.1.4/String.html#method-i-strip) says:
**strip → new_str**
*Returns a copy of str with leading and trailing whitespace removed.*
But
~~~
[9] pry(main)> "#{0.chr}#{9.chr}#{10.chr}#{11.chr}#{12.chr}#{13.chr}#{32.chr}"
=> "\x00\t\n\v\f\r "
[10] pry(main)> "#{0.chr}#{9.chr}#{10.chr}#{11.chr}#{12.chr}#{13.chr}#{32.chr}".length
=> 7
[11] pry(main)> "#{0.chr}#{9.chr}#{10.chr}#{11.chr}#{12.chr}#{13.chr}#{32.chr}".strip
=> ""
~~~
~~~
([4] pry(main)> (0..255).each { |char| puts "char #{char} stripped" if char.chr.strip.empty? }
char 0 stripped
char 9 stripped
char 10 stripped
char 11 stripped
char 12 stripped
char 13 stripped
char 32 stripped
~~~
Stripped characters are
1. Null char (0)
1. Horizontal Tab (9)
1. Line Feed (10)
1. Vertical Tab (11)
1. Form Feed (12)
1. Carriage Return (13)
1. Space (32)
---Files--------------------------------
bug-10476.patch (2.16 KB)
--
https://bugs.ruby-lang.org/