2008/8/19 Matthew Boeh <mboeh / desperance.net>:
> On Wed, Aug 20, 2008 at 04:39:45AM +0900, Pit Capitain wrote:
>> 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.

Thanks Matthew. I always understood #expand_path to just create an
absolute path, and that expanding user home dirs was only a side
effect, but I can see that the word "expand" could have a different
meaning here. Guess it always depends on what OSes and with which
tools you've worked before.

So maybe another method #absolute_path isn't that bad an idea, because
of the problems Chuck has run into. I'm glad I don't have to decide
whether it is worth the new method.

Regards,
Pit