At 2009-09-17 03:01PM, "Jes Gabriel y Gal" wrote:
>  File.open("directory") do |file|
>          while somedigit =3D file.gets
>                  somedigit.chomp!
>                  puts "SQL STATEMENT I MADE UP =3D'"+somedigit+"'"
>          end
>   end
>  
>  In summary, gets returns the \n at the end of the line, so you should remov=
>  e it.

This form of file reading is somewhat more succinct:

    File.foreach('filename') do |line|
      line.chomp
      line.do_something_with_me
    end

-- 
Glenn Jackman
    Write a wise saying and your name will live forever. -- Anonymous