From: James Edward Gray II Date: 2007-01-11T00:00:21+09:00 Subject: Re: [QUIZ] Word Blender (#108) On Jan 7, 2007, at 6:47 AM, Fedor Labounko wrote: > It just so happened that I was learning ruby last summer and wrote > a program to cheat for me at TextTwist. Needless to say the game > got boring really fast, but it was neat writing the program. I've > modified it a bit to instead play the game, but I'm a fairly new > user and would appreciate any feedback, both ruby related and > general programming. Looking pretty good to me. > Also, I have the problem that when running this on Windows it > doesn't allow me to manipulate files with Ruby, giving me a > Permission Denied error on File.open. Any idea why this might be? Well, you pass open() three arguments: File.open("reducedwordlist#{i}.txt", "w", File::CREAT) do |fout| I'm pretty sure that form has the third argument being the permissions of the new file. Take out the File::CREAT, the "w" mode string handles that automatically, and see if that fixes it up. Hope that helps. James Edward Gray II