--Ycz6tD7Th1CMF4v7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> 	Can someone explain why this doesn't work:
>=20
> seanl:src/apache > ruby
> f =3D File.new('testing', 0600, File::CREAT|File::TRUNC|File::WRONLY|File=
::EXCL)
> f.puts('foobar')
> f.close()^D
> -:1:in `initialize': No such file or directory - "testing"=20
> (Errno::ENOENT)
>         from -:1:in `new'
>         from -:1
>=20

	Ah! Figured it out.  Dave, I have some errata for 'ya.  Page 308=20
under the Class method new an example is written as:

File.new("testing", 0644, File::CREAT|File::TRUNC|File::RDWR)

	And it should be:

File.new("testing", File::CREAT|File::TRUNC|File::RDWR, 0644)

	I thought that looked funny.  Anyway, that solves many problems,=20
including the funky file modes.  ;)  -sc

--=20
Sean Chittenden

--Ycz6tD7Th1CMF4v7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean / chittenden.org>

iEYEARECAAYFAjuHUzcACgkQn09c7x7d+q2NjgCgnFOAA1kg2w89lrwlxZ3GIsd5
c1EAnR7eQMoNTXRYp1X8XhAg/Am4Vvyi
=antW
-----END PGP SIGNATURE-----

--Ycz6tD7Th1CMF4v7--
> 	Can someone explain why this doesn't work:
>=20
> seanl:src/apache > ruby
> f =3D File.new('testing', 0600, File::CREAT|File::TRUNC|File::WRONLY|File=
::EXCL)
> f.puts('foobar')
> f.close()^D
> -:1:in `initialize': No such file or directory - "testing"=20
> (Errno::ENOENT)
>         from -:1:in `new'
>         from -:1
>=20

	Ah! Figured it out.  Dave, I have some errata for 'ya.  Page 308=20
under the Class method new an example is written as:

File.new("testing", 0644, File::CREAT|File::TRUNC|File::RDWR)

	And it should be:

File.new("testing", File::CREAT|File::TRUNC|File::RDWR, 0644)

	I thought that looked funny.  Anyway, that solves many problems,=20
including the funky file modes.  ;)  -sc

--=20
Sean Chittenden
-----BEGIN PGP SIGNATURE-----
Comment: Sean Chittenden <sean / chittenden.org>

iEYEARECAAYFAjuHUzcACgkQn09c7x7d+q2NjgCgnFOAA1kg2w89lrwlxZ3GIsd5
c1EAnR7eQMoNTXRYp1X8XhAg/Am4Vvyi
=antW
-----END PGP SIGNATURE-----