From: Jos Backus Date: 2001-07-09T06:13:18+09:00 Subject: [ruby-talk:17510] Re: Aliases for class methods On Mon, Jul 09, 2001 at 02:07:25AM +0900, Dave Thomas wrote: > > to open the file "data" for append. Similarly with "> file", "< file", > > "+> file", "+< file" etc. > > > > As far as I know, this syntax isn't available in Ruby, Fwiw, I happen to think that this is a Good Thing, and I am not alone: http://www.FreeBSD.org/cgi/getmsg.cgi?fetch=791771+793951+/usr/local/www/db/text/2001/cvs-all/20010107.cvs-all This is a crutch, not a cure. The fundamental problem here is that open() mixes information about the type of operation to perform with the name of the file on which to perform that operation - which is very poor API design. My advice is to use sysopen() consistently except for these two cases: open(PIPE, "-|") and open(PIPE, "|-"). DES -- Dag-Erling Smorgrav - des@ofug.org [end quote] -- Jos Backus _/ _/_/_/ Santa Clara, CA _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ josb@cncdsl.com _/_/ _/_/_/ use Std::Disclaimer;