From: Gavin Sinclair Date: 2003-01-13T22:58:52+09:00 Subject: Re: Float#to_s ??? On Tuesday, January 14, 2003, 12:50:24 AM, Jim wrote: > On Monday, 13 January 2003 at 22:46:25 +0900, Gavin Sinclair wrote: >> On Tuesday, January 14, 2003, 12:43:40 AM, Gavin wrote: >> >> > I think I'm going mad.... >> >> Let me provide further evidence: >> >> >> f = Time.now.to_f >> => 1042465453 >> >> g = Time.now.to_f >> => 1042465457 >> >> f - g >> => -4.146000028 > [Expected behaviour is displayed in 1.7] > I think the digits are there, they just are not printing. Thanks for the results, Jim. You're right that the digits are there, the subtraction above proves it. But why wouldn't they print? They are Floats. Float#to_s prints digits (e.g. the literal 1.5). It is as if the results from Time.to_f are singleton objects whose #to_s has been rewritten! I wish there was a way to know if an object is a singleton or has otherwise been structually modified. Gavin