Project

General

Profile

Actions

Bug #14863

closed

Array#join with empty array returns empty string always in US-ASCII encoding

Added by xsimov (Xavier Simó) almost 6 years ago. Updated almost 6 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-core:87562]

Description

Calling

irb(main):001:0> [].join.encoding
=> #<Encoding:US-ASCII>

returns an empty string and that empty string is always in US-ASCII encoding.

The expected result is that the returned empty string would be in UTF-8 since it seems to be the default for Ruby strings since 2.0.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0