From: Bazsl Date: 2007-10-15T09:00:45+09:00 Subject: Re: Piping binary files Bazsl wrote: > I want to pipe a binary file through a Ruby script. I have tried > > while (b = STDIN.getc) > STDOUT.putc(b) > end > > and it works with text files but corrupts an mp3 file. STDIN.binmode > did not help. I can't find read and write methods of the IO class that > work with binary files. What am I missing? Thanks. > > > Ignore my question. I made a dumb mistake.