From: Jim Freeze Date: 2003-01-13T22:47:06+09:00 Subject: Re: Float#to_s ??? Maybe a 1.6.8 problem: irb irb(main):001:0> t,f=Time.now.to_f, 1.5 => [1042465529.056271, 1.5] irb(main):002:0> puts t,f 1042465529.056271 1.5 => nil irb(main):003:0> puts t.class, f.class Float Float => nil irb(main):004:0> puts Time.now.to_f 1042465559.700954 => nil irb(main):005:0> VERSION => "1.7.3" irb(main):006:0> On Monday, 13 January 2003 at 22:43:40 +0900, Gavin Sinclair wrote: > I think I'm going mad.... > > >> t, f = Time.now.to_f, 1.5 > => [1042465260, 1.5] > > >> puts t, f > 1042465260 > 1.5 > => nil > > >> puts t.class, f.class > Float > Float > => nil > > Why doesn't "puts Time.now.to_f" print the fractional part of the > current epoch second? -- Jim Freeze ---------- I have discovered the art of deceiving diplomats. I tell them the truth and they never believe me. -- Camillo Di Cavour