ruby-changes:52208
From: eregon <ko1@a...>
Date: Fri, 17 Aug 2018 22:07:42 +0900 (JST)
Subject: [ruby-changes:52208] eregon:r64416 (trunk): Guard connect_nonblock spec on FreeBSD
eregon 2018-08-17 22:07:37 +0900 (Fri, 17 Aug 2018) New Revision: 64416 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64416 Log: Guard connect_nonblock spec on FreeBSD Modified files: trunk/spec/ruby/library/socket/socket/connect_nonblock_spec.rb Index: spec/ruby/library/socket/socket/connect_nonblock_spec.rb =================================================================== --- spec/ruby/library/socket/socket/connect_nonblock_spec.rb (revision 64415) +++ spec/ruby/library/socket/socket/connect_nonblock_spec.rb (revision 64416) @@ -97,24 +97,26 @@ describe 'Socket#connect_nonblock' do https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/socket/connect_nonblock_spec.rb#L97 end end - describe 'using a STREAM socket' do - before do - @server = Socket.new(family, :STREAM) - @client = Socket.new(family, :STREAM) - @sockaddr = Socket.sockaddr_in(0, ip_address) - end + platform_is_not :freebsd do + describe 'using a STREAM socket' do + before do + @server = Socket.new(family, :STREAM) + @client = Socket.new(family, :STREAM) + @sockaddr = Socket.sockaddr_in(0, ip_address) + end - after do - @client.close - @server.close - end + after do + @client.close + @server.close + end - it 'raises IO:EINPROGRESSWaitWritable when the connection would block' do - @server.bind(@sockaddr) + it 'raises IO:EINPROGRESSWaitWritable when the connection would block' do + @server.bind(@sockaddr) - lambda { - @client.connect_nonblock(@server.getsockname) - }.should raise_error(IO::EINPROGRESSWaitWritable) + lambda { + @client.connect_nonblock(@server.getsockname) + }.should raise_error(IO::EINPROGRESSWaitWritable) + end end end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/