From: "Andreas S." Date: 2006-01-01T07:09:32+09:00 Subject: Re: my stupid code ... Erik Veenstra wrote: >> I'm trying to write a small ruby script which accepts: >> >> 1. Input : File or $stdin >> 2. Output : File or $stdout > > Abstraction is the keyword. Put the decision to open a file or > stdin or stdout in a a method on the class File and put that > code in a library. That keeps your application clean and > simple. I do not think that tinkering with the core classes is a good idea for problems as simple as this. -- Posted via http://www.ruby-forum.com/.