[ruby-core:93665] [Ruby master Feature#15958] Time#inspect with frac

[email protected]
Newsgroups gmane.comp.lang.ruby.core
Message-ID <redmine.journal-79277.20190711054339.2cf42c1b7ce8a36a@ruby-lang.org>
Issue #15958 has been updated by matz (Yukihiro Matsumoto).


I am not entirely against the idea, just worrying compatibility.
Should we experiment `Time#inspect` with fraction output?

Matz.

----------------------------------------
Feature #15958: Time#inspect with frac
https://bugs.ruby-lang.org/issues/15958#change-79277

* Author: naruse (Yui NARUSE)
* Status: Assigned
* Priority: Normal
* Assignee: matz (Yukihiro Matsumoto)
* Target version: 
----------------------------------------
When Matz changed Time#to_s format in 2006, frac part of Time string is dropped because it is considered not useful.
[ruby-dev:29440]

But recently we encounters some troubles the comparison of Time objects whose frac parts are different.
https://twitter.com/__gfx__/status/1143056072422219776

For example a is original object and b is once stored in RDB (and dropped the frac part).
Or there're multiple time objects which are generated in a single HTTP request.
Of course they are different and assert_equal will be failed but inspect doesn't show the frac part.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:[email protected]?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.