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

On Wed, Aug 20, 2008 at 04:39:45AM +0900, Pit Capitain wrote:
> 2008/8/19 Trans <transfire / gmail.com>:
> > Is this common practice? I mean it seems like a sucky edge case to
> > have to fuss with. Why not just have a separate method for that, say
> >
> >  File.home_path('thornton')
> 
> +1
> 
> Though it might be common unix practice, Ruby could/should have a more
> explicit way to get at the home path of a user. I think there's no
> need to encode this in a file naming scheme. Can anyone show me a use
> case where it would be more appropriate to have the existing behaviour
> instead of a separate method?

User input:

  config = YAML.load(File.read(config_file_path))
  destination_path = File.expand_path(config["destination_path"])

I've always understood File.expand_path to be intended for this kind of use, 
where a user might plausibly expect to be able to use the kind of expansions 
they can in the Bourne shell. 

--
Matthew Boeh

--Q0rSlbzrZN6k9QnT
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFIqyY7fi+i1R7d/ZwRAsPuAJ4xniQTCO5xjX0ITauKlbExHRnteQCfVgTZ
q2rpnHcpy8oWwxe3HUfc5446
-----END PGP SIGNATURE-----

--Q0rSlbzrZN6k9QnT--