Project

General

Profile

Actions

Bug #12368

closed

default encoding of Integer#chr

Added by usa (Usaku NAKAMURA) almost 8 years ago. Updated about 4 years ago.

Status:
Rejected
Assignee:
-
Target version:
-
[ruby-dev:49616]
Tags:

Description

現状、Integer#chrは引数なしの場合には、

  1. default internalが設定されていればそれを使う
  2. default internalがnilならASCII(-8BIT)とみなす

という挙動になっていますが、2の部分についてはかつてscript encodingのデフォルトがUS-ASCIIだった時代の名残のような気がします。
というわけで、2の場合にはscript encodingとみなすのが正しいのではないでしょうか。


Files

chr.diff (1.51 KB) chr.diff usa (Usaku NAKAMURA), 05/11/2016 05:41 AM

Updated by duerst (Martin Dürst) almost 8 years ago

What about making the default UTF-8. This is the same as source encoding for many scripts now. According to the experts at the Ruby Committer meeting, the information about the script encoding is only available in the parser.

Updated by mame (Yusuke Endoh) about 4 years ago

  • Status changed from Open to Rejected

ユースケースが失念されたってことで一旦閉じることに。

Actions

Also available in: Atom PDF

Like0
Like0Like0