* [ruby-dev:50923] [Ruby master Bug#12368] default encoding of Integer#chr
[not found] <redmine.issue-12368.20160511054238.9@ruby-lang.org>
@ 2020-03-16 7:40 ` mame
0 siblings, 0 replies; only message in thread
From: mame @ 2020-03-16 7:40 UTC (permalink / raw)
To: ruby-dev
Issue #12368 has been updated by mame (Yusuke Endoh).
Status changed from Open to Rejected
ユースケースが失念されたってことで一旦閉じることに。
----------------------------------------
Bug #12368: default encoding of Integer#chr
https://bugs.ruby-lang.org/issues/12368#change-84671
* Author: usa (Usaku NAKAMURA)
* Status: Rejected
* Priority: Normal
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
現状、`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)
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-16 7:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <redmine.issue-12368.20160511054238.9@ruby-lang.org>
2020-03-16 7:40 ` [ruby-dev:50923] [Ruby master Bug#12368] default encoding of Integer#chr mame
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).