From: Arup Rakshit Date: 2013-02-01T04:00:58+09:00 Subject: Re: Save a file by clicking on a link > @download_directory = "#{Dir.pwd}/RubyDownloads" > @current_downloads = Dir.entries( @download_directory ) > > def wait_for_download > > #Find the newest file > difference = [1,2] - here why you took size 2 of array? > until difference.size == 1 - why 1? > difference = Dir.entries(@download_directory) - @current_downloads -- in the above line what are we doing? > sleep 0.1 > end -- Posted via http://www.ruby-forum.com/.