Project

General

Profile

Bug #2632 » test.rb

wanabe (_ wanabe), 01/23/2010 03:23 AM

 
require "socket"

gs = TCPServer.open(0)
s1 = TCPSocket.open("localhost", gs.addr[1])
s2 = gs.accept

s1.puts "foo"
s2.puts "bar"

s1.close
p s2.gets
(1-1/2)