> I guess it's the OS limitation of pipe(2).  They have limited sized
> buffer, so that if you put too much data on them, they block.

Thanks for the info!

I realized that Kernel.print and Kernel.puts don't really need an "IO"
object, just something that supports the interface it uses.  The code
below isn't a complete mockup of a IO, but it gets the point across
(and works for my example)

~ Patrick

--------------------

aString = ""

# used to break at 611.times
1000.times { |i| aString += "print \"#{i}\"\n" }

puts aString.length

class MockIO
	def write( string )
	    if (@__content__)
	        @__content__ += string
	    else
	        @__content__ = string
	    end
	end

	def read
	    @__content__
	end

end

io = MockIO.new

$defout = io

eval( aString )

output = io.read

$defout = $stdout

print output

--------------------