From: "Martin J. Dürst" Date: 2013-02-01T20:23:50+09:00 Subject: [ruby-core:51790] Re: [ruby-trunk - Bug #7752] Rational/Float/Fixnum/Bignum `.to_s.encoding` is US-ASCII On 2013/01/31 18:07, coffeejunk (Maximilian Haack) wrote: > > Issue #7752 has been updated by coffeejunk (Maximilian Haack). > > > The only problem I see is that ruby is lying to the user. There is 0% lying if one claims that an ASCII-only string is US-ASCII. There is also 0% lying if one claims it's UTF-8. > It is not severe since, as you said, there are no non-ascii characters in the resulting string, but I think ruby should respect the set encoding. Setting Encoding.default_internal (or something else) is not a guarantee that all Strings will be in that encoding. Otherwise, it wouldn't be called "default". Regards, Martin. > ---------------------------------------- > Bug #7752: Rational/Float/Fixnum/Bignum `.to_s.encoding` is US-ASCII > https://bugs.ruby-lang.org/issues/7752#change-35742