> The program runs perfectly on the two laptops, but not on my desktop.
> 
> The command line for the file looks like: Decrypt.rb test1.in test2.in
> <input.in

That is indeed odd. You'd have to go down into the C to see why that is 
happening (and try to reproduce it with "straight C" or what not).

Perhaps it is caused by a subtle difference in OS or msvcrt.dll version?

Anyway, you could work around by noting that gets "by default" reads 
from the files passed as parameters:

http://stackoverflow.com/questions/2294439/unexpected-gets-behavior-with-commandline-arguments-in-ruby-closed

But I'd probably do something like
$ ruby Decrypt.rb test1.in test2.in input.in


file = File.open(ARGV.pop, 'r')
file.gets

GL.
-rp
-- 
Posted via http://www.ruby-forum.com/.