From: Bertram Scharpf Date: 2007-06-29T19:33:53+09:00 Subject: Re: Feature Request: Special file '-' denoting stdin/stdout Hi, Am Freitag, 29. Jun 2007, 18:47:43 +0900 schrieb Ronald Fischer: > I would like to propose a feature for Ruby which can be > found in Perl, [...] > > When a file is opened for reading, and the filename is > "-", the file is assumed to be standard input. > > When a file is opened for writing, and the filename is > "-", the file is assumed to be standard output. > Something like class < else yield $< end else File.open name, mode do |f| yield f end end end end Untested. Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de