Open a file and write string into it
check = IO.popen("spell","r+") check.puts("A") check.puts("D") check.close_write list = check.readlines list.collect! { |x| x.chomp }