Sha256: f3539ba08ceb112e14dede153fde6f7b2b7c2ab080c37087ce379e2cf3bd65da
Contents?: true
Size: 532 Bytes
Versions: 30
Compression:
Stored size: 532 Bytes
Contents
# -*- encoding: binary -*- require 'test/unit' $-w = true require 'kgio' class TestKgioAddr < Test::Unit::TestCase def test_tcp addr = ENV["TEST_HOST"] || '127.0.0.1' tcp = TCPServer.new(addr, 0) port = tcp.addr[1] client = Kgio::TCPSocket.new(addr, port) accepted = tcp.accept assert ! accepted.instance_eval { defined?(@kgio_addr) } accepted.extend Kgio::SocketMethods s = accepted.kgio_addr! assert_equal addr, s assert_equal addr, accepted.instance_variable_get(:@kgio_addr) end end
Version data entries
30 entries across 30 versions & 2 rubygems