[#62904] [ruby-trunk - Feature #9894] [Open] [RFC] README.EXT: document rb_gc_register_mark_object — normalperson@...
Issue #9894 has been reported by Eric Wong.
3 messages
2014/06/02
[#63321] [ANN] ElixirConf 2014 - Don't Miss Jos辿 Valim and Dave Thomas — Jim Freeze <jimfreeze@...>
Just a few more weeks until ElixirConf 2014!
6 messages
2014/06/24
[#63391] Access Modifiers (Internal Interfaces) — Daniel da Silva Ferreira <danieldasilvaferreira@...>
Hi,
3 messages
2014/06/28
[ruby-core:63214] [ruby-trunk - Bug #9951] [Rejected] DateTime.strftime and Time.strftime differ in how they treat "%L"
From:
akr@...
Date:
2014-06-18 05:45:26 UTC
List:
ruby-core #63214
Issue #9951 has been updated by Akira Tanaka.
Status changed from Assigned to Rejected
The problem of float is ruby can not know what user want to
specify 5.678 or 5.67799999999999993605115378159098327159881591796875.
DateTime's rounding to nanosecond means DateTime suppose
users don't want to specify under-nanosecond time.
I don't want to such assumption for Time.
%L uses floor because 0.9999 should be shown as 999, not 1000.
So, I don't have idea to solve this issue in Ruby side.
Please use rational, such as 5.678r.
```
% ruby -e 'p Time.new(2014,1,2,3,4,5.678r).strftime("%L")'
"678"
```
----------------------------------------
Bug #9951: DateTime.strftime and Time.strftime differ in how they treat "%L"
https://bugs.ruby-lang.org/issues/9951#change-47262
* Author: David Chelimsky
* Status: Rejected
* Priority: Normal
* Assignee: Akira Tanaka
* Category: core
* Target version:
* ruby -v: 1.9.3 - 2.1.1
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
~~~ruby
DateTime.new(2014,1,2,3,4,5.678).strftime("%L")
# => "678"
Time.new(2014,1,2,3,4,5.678).strftime("%L")
# => "677"
~~~
I think these should both produce "678", but at the very least they should produce the same number so users don't have to special case one or the other. I realize there is floating point math under the hood here, but that's an implementation detail I don't think users should care about in this case.
--
https://bugs.ruby-lang.org/