From: Dossy Date: 2002-06-16T22:45:57+09:00 Subject: Re: File.new('foo', 0600 , 'wb') On 2002.06.16, YANAGAWA Kazuhisa wrote: > > That's not a bug but a new feature implemented in 1.7.x, IMO. The > description of THE BOOK means following case: > > >ruby -e 'File.new("/tmp/foo", File::CREAT, 0600) > >ls -l /tmp/foo > -rw------- 1 kjana wheel 0 6/16 12:10 /tmp/foo > > namely open(2) system call like form. This form should work on both > 1.6.x and 1.7.x. I just tested on 1.6.7 and you're right: using File::CREAT instead of "wb" does what one would expect with regard to the file permissions. -- Dossy -- Dossy Shiobara mail: dossy@panoptic.com Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70)