Project

General

Profile

Actions

Feature #15958

closed

Time#inspect with frac

Added by naruse (Yui NARUSE) about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Target version:
-
[ruby-core:93356]

Description

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.


Related issues 1 (0 open1 closed)

Related to Ruby - Feature #16470: Issue with nanoseconds in Time#inspectClosedmatz (Yukihiro Matsumoto)Actions

Updated by matz (Yukihiro Matsumoto) about 6 years ago

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

Matz.

Actions #2

Updated by naruse (Yui NARUSE) almost 6 years ago

  • Status changed from Assigned to Closed

Applied in changeset git|5208c431bef3240eb251f5da23723b324431a98e.


Separate Time#inspect from to_s and show subsec [Feature #15958]

Actions #3

Updated by Eregon (Benoit Daloze) about 5 years ago

  • Related to Feature #16470: Issue with nanoseconds in Time#inspect added
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy