From: daz Date: 2004-07-11T05:27:28+09:00 Subject: Re: Ruby Snapshot Notifier Shashank Date wrote: > "daz" wrote > > > > > if ft > ft_prev > ^^^^^^^^^ > This condition gives me an error (ruby 1.8.2-rc14) ... Hi Shanko, Oh, true. The line immediately below that should be modified in the same way, I guess. I must have run with: ruby 1.8.0 (2003-05-15) [i386-mswin32] Most later versions of Ruby require to_i before comparison of Time and Fixnum objects. > ... but it can easily be fixed like so: > > if ft > ft_prev ## original > ^^^^^^^^^ > if ft.to_i > ft_prev.to_i <----------* new > > > if ft_prev > 0 ## original > ^^^^^^^^^ if ft_prev.to_i > 0 <----------* new > > puts "Replacing: #{ft_prev}" > > else > > puts "No previous snapshot found (first run)" > > end Thanks for the 'patch'. I said that it looked like Perl ... .... I think it looks more like a Makefile :-# ruby ftp_snap.rb # doesn't look as bad, tho'. > -- shanko > daz