24 May
2011
24 May
'11
4:05 a.m.
Branch: refs/heads/master Home: https://github.com/MacRuby/MacRuby Commit: 1576cc3491ee43384a7dd6a12a20fae831b52c8c https://github.com/MacRuby/MacRuby/commit/1576cc3491ee43384a7dd6a12a20fae831... Author: Watson <watson1978@gmail.com> Date: 2011-05-23 (Mon, 23 May 2011) Changed paths: M ext/socket/socket.c Log Message: ----------- raise an IOError when use a closed socket because Segfault occurs. Test Script: {{{ require 'test/unit/assertions.rb' include Test::Unit::Assertions require 'socket' s = Socket.new(Socket::AF_INET, Socket::SOCK_STREAM, 0) s.close assert_raise(IOError){ s.send("test data", 0) } s = Socket.allocate assert_raise(IOError){ s.send("test data", 0) } puts :ok }}}