From: Michael Gorsuch Date: 2007-07-25T04:21:30+09:00 Subject: Re: Attaching a script to IO On Wed, Jul 25, 2007 at 03:48:11AM +0900, Ari Brown wrote: > Hey all, > I'm trying to attach a script's output to IO (a socket. Is IO > the right term?) Works for me! > I currently use a GServer script to accept connections from localhost. Well, can you just send whatever you need to send via puts? Example: class MyThingy < GServer def initialize(port=3000, *args) super(port, *args) end def serve(io) io.puts "Hello!" end end > > I don't know if that made sense, but is there any way to change the > default output to my socket output? > > Thanks, > ---------------------------------------------------------------| > ~Ari > ruby 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.10.0] > > > >