From: "zzak (Zachary Scott)" Date: 2013-01-20T13:37:16+09:00 Subject: [ruby-core:51523] [ruby-trunk - Bug #6820] Time#to_s on NEWS Issue #6820 has been updated by zzak (Zachary Scott). I think this is a bug on Time#to_s, not NEWS. From #5226: tenderlovemaking (Aaron Patterson) wrote: > I think the encoding of Time#to_s should default to US-ASCII, but respect Encoding.default_internal. > > I've attached a patch to make Time#to_s respect Encoding.default_internal. The result is: > > irb(main):001:0> Encoding.default_internal > => nil > irb(main):002:0> Time.now.to_s.encoding > => # > irb(main):003:0> Encoding.default_internal = Encoding::UTF_8 > => # > irb(main):004:0> Time.now.to_s.encoding > => # > irb(main):005:0> Can we change description? ---------------------------------------- Bug #6820: Time#to_s on NEWS https://bugs.ruby-lang.org/issues/6820#change-35490 Author: no6v (Nobuhiro IMAI) Status: Assigned Priority: Normal Assignee: tenderlovemaking (Aaron Patterson) Category: Target version: 2.0.0 ruby -v: ruby 2.0.0dev (2012-08-01 trunk 36587) [x86_64-linux] =begin The Time section on NEWS file says an encoding of Time#to_s respects Encoding.default_internal, but r33094 says it is always US-ASCII. I guess NEWS file is incorrect. See also #5226. $ ruby -E:utf-8 -ve 'p Encoding.default_internal, Time.now.to_s.encoding' ruby 2.0.0dev (2012-08-01 trunk 36587) [x86_64-linux] # # =end -- http://bugs.ruby-lang.org/