From: David Alan Black Date: 2002-02-15T00:47:09+09:00 Subject: Re: File.open weirdness Hello -- On Fri, 15 Feb 2002, Craig Files wrote: > Hi, > I need some help figuring out why the following ruby code does not work. > > ruby: > File.open("test.cmd",0666,File::CREAT|File::TRUNC|File::WRONLY){ |file| > file.puts("Write something in the file\n") > file.puts("Write something else in the file\n") > } > File.open("test.cmd",0666,File::CREAT|File::TRUNC|File::WRONLY){ |file| > file.puts("Write something in the file\n") > } Put the permissions after the mode :-) David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav