Forum: Ruby-core [ruby-trunk - Bug #6820][Open] Time#to_s on NEWS

Posted by no6v (Nobuhiro IMAI) (Guest)
on 2012-08-01 20:23
(Received via mailing list)
Issue #6820 has been reported by no6v (Nobuhiro IMAI).

----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820

Author: no6v (Nobuhiro IMAI)
Status: Open
Priority: Normal
Assignee:
Category:
Target version:
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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by mame (Yusuke Endoh) (Guest)
on 2012-11-03 04:20
(Received via mailing list)
Issue #6820 has been updated by mame (Yusuke Endoh).

Status changed from Open to Assigned
Assignee set to tenderlovemaking (Aaron Patterson)
Target version set to 2.0.0

Aaron, what do you think?

--
Yusuke Endoh <mame@tsg.ne.jp>
----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820#change-32277

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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by no6v (Nobuhiro IMAI) (Guest)
on 2013-01-06 03:21
(Received via mailing list)
Issue #6820 has been updated by no6v (Nobuhiro IMAI).

File Time-on-NEWS.patch added

=begin
This is still leaving...

 $ ruby -E:utf-8 -ve 'p Encoding.default_internal, 
Time.now.to_s.encoding'
 ruby 2.0.0dev (2013-01-06 trunk 38711) [x86_64-linux]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>

I attached a patch to drop whole section of Time. Would you confirm 
that?
=end

----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820#change-35226

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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by zzak (Zachary Scott) (Guest)
on 2013-01-20 05:37
(Received via mailing list)
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:
> irb(main):004:0> Time.now.to_s.encoding
> => #<Encoding:UTF-8>
> 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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by no6v (Nobuhiro IMAI) (Guest)
on 2013-01-20 09:01
(Received via mailing list)
Issue #6820 has been updated by no6v (Nobuhiro IMAI).


> 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.

It seems that Naruse-san didn't implement so on this point at r33094 
explicitly.

    * time.c (time_to_s): the resulted string of Time#to_s is always
      ascii only, so this should be US-ASCII.

----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820#change-35495

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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by zzak (Zachary Scott) (Guest)
on 2013-01-20 19:50
(Received via mailing list)
Issue #6820 has been updated by zzak (Zachary Scott).


=begin
Thank you for finding that revision Nobuhiro-san, I must have missed it.

I think NEWS should say simply:
(({Time#to_s now returns US-ASCII encoding instead of BINARY}))
=end

----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820#change-35507

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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Posted by Student Jr (student)
on 2013-01-21 08:29
(Received via mailing list)
Sorry for not going through the bug system, but it's late, and I have
another issue I am working.

make check

<snip>

[  912/13042] OpenSSL::TestX509Store#test_verify = 0.06 s
   1) Failure:
test_verify(OpenSSL::TestX509Store)
[/home/zooks/work/ruby_git/test/openssl/test_x509store.rb:89]:
<true> expected but was
<false>.

<snip>

[11045/13042] TestRubyOptions#test_segv_test = 0.27 s
   8) Failure:
test_segv_test(TestRubyOptions)
[/home/zooks/work/ruby_git/test/ruby/test_rubyoptions.rb:512]:
Expected /#<Bogus:/ to match "-e:3: [BUG] Segmentation fault\nruby
2.0.0dev (2013-01-21 trunk 38891) [i686-linux]\n\n-- Control frame
information -----------------------------------------------\nc:0003
p:---- s:0009 e:000008 CFUNC  :kill\nc:0002 p:0041 s:0004 e:000f54 EVAL
-e:3 [FINISH]\nc:0001 p:0000 s:0002 e:00004c TOP [FINISH]\n\n-e:3:in
`<main>'\n-e:3:in `kill'\n\n-- C level backtrace information
-------------------------------------------\n/home/zooks/work/ruby_git/ruby(+0x15a4f2)
[0x4015a4f2]\n/home/zooks/work/ruby_git/ruby(+0x1b23df)
[0x401b23df]\n/home/zooks/work/ruby_git/ruby(rb_bug+0x49)
[0x401b2629]\n/home/zooks/work/ruby_git/ruby(+0xd72ec)
[0x400d72ec]\n[0x40235410]\n/home/zooks/work/ruby_git/ruby(+0x13e15d)
[0x4013e15d]\n/home/zooks/work/ruby_git/ruby(+0x143baa)
[0x40143baa]\n/home/zooks/work/ruby_git/ruby(+0x158ccd)
[0x40158ccd]\n/home/zooks/work/ruby_git/ruby(+0x147ef5)
[0x40147ef5]\n/home/zooks/work/ruby_git/ruby(+0x14d04f)
[0x4014d04f]\n/home/zooks/work/ruby_git/ruby(rb_iseq_eval_main+0x140)
[0x4014d450]\n/home/zooks/work/ruby_git/ruby(+0x1977a)
[0x4001977a]\n/home/zooks/work/ruby_git/ruby(ruby_run_node+0x42)
[0x4001c1b2]\n/home/zooks/work/ruby_git/ruby(+0x17bd8)
[0x40017bd8]\n/lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe6)
[0x40316bd6]\n/home/zooks/work/ruby_git/ruby(+0x17aa1)
[0x40017aa1]\n\n-- Other runtime information
-----------------------------------------------\n\n* Loaded script:
-e\n\n* Loaded features:\n\n".

<snip>

Working directory was /home/zooks/work/ruby_git/
Posted by no6v (Nobuhiro IMAI) (Guest)
on 2013-01-21 10:24
(Received via mailing list)
Issue #6820 has been updated by no6v (Nobuhiro IMAI).


> I think NEWS should say simply:
> (({Time#to_s now returns US-ASCII encoding instead of BINARY}))

@zzak Sounds good. I've been misunderstood as nothing has changed, 
thanks :).

----------------------------------------
Bug #6820: Time#to_s on NEWS
https://bugs.ruby-lang.org/issues/6820#change-35512

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]
 #<Encoding:UTF-8>
 #<Encoding:US-ASCII>
=end
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.