[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:78930] [Ruby trunk Bug#8289] [].join.encoding # => US-ASCII (I expect also UTF-8
From:
naruse@...
Date:
2017-01-01 16:51:10 UTC
List:
ruby-core #78930
Issue #8289 has been updated by Yui NARUSE.
Backport deleted (1.9.3: UNKNOWN, 2.0.0: UNKNOWN)
Khalil Fazal wrote:
> puts [].join.encode("utf-8").encoding
`puts [].join.force_encoding("utf-8").encoding` is correct because of both semantic and performance.
String#force_encoding just overwrite the encoding of string instead of String#encode which is encoding conversion.
----------------------------------------
Bug #8289: [].join.encoding # => US-ASCII (I expect also UTF-8
https://bugs.ruby-lang.org/issues/8289#change-62350
* Author: Peter Vandenabeele
* Status: Rejected
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.1.0dev (2013-04-19) [x86_64-darwin12.3.0]
* Backport:
----------------------------------------
May be related to http://bugs.ruby-lang.org/issues/5379
$ date
Thu Apr 18 23:56:54 CEST 2013
$ rvm get stable
$ rvm install ruby-head
... long compile process ...
$ rvm use ruby-head
Using /Users/peter_v/.rvm/gems/ruby-head
$ ruby -v
ruby 2.1.0dev (2013-04-19) [x86_64-darwin12.3.0]
$ cat empty_array_join_returns_ASCII_encoding.rb
puts ["abc"].join.encoding
puts [].join.encoding
puts [].join.encode("utf-8").encoding
# Actual result:
$ ruby -v empty_array_join_returns_ASCII_encoding.rb
ruby 2.1.0dev (2013-04-19) [x86_64-darwin12.3.0]
UTF-8
US-ASCII
UTF-8
# Expected result
$ ruby -v empty_array_join_returns_ASCII_encoding.rb
ruby 2.1.0dev (2013-04-19) [x86_64-darwin12.3.0]
UTF-8
UTF-8 # This is edited for expected result (not the actual result)
UTF-8
I would expect that in Ruby 2.0 with UTF-8 as default encoding,
the returned encoding of an array (with default encoding strings),
is _always_ UTF-8, independent of the size of the array.
The current behaviour breaks my tests for an output encoding of
UTF-8 in the case the array is empty.
My work around is `array.join().encode("utf-8")` which works, but is ugly.
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>