Skip to content

Commit 18b7e2f

Browse files
committed
Guard a failing test for Socket.tcp to skip Ruby 3.3
1 parent 8298bc6 commit 18b7e2f

1 file changed

Lines changed: 13 additions & 11 deletions

File tree

‎library/socket/socket/tcp_spec.rb‎

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,19 @@
109109
@server.close
110110
end
111111

112-
it 'connects over IPv4 when only the IPv4 address is listening' do
113-
@client = Socket.tcp('localhost', @port, connect_timeout: 10)
114-
115-
@client.remote_address.ip_address.should == '127.0.0.1'
116-
@client.write('hello').should == 5
117-
118-
connection = @server.accept
119-
begin
120-
connection.read(5).should == 'hello'
121-
ensure
122-
connection.close
112+
ruby_version_is "3.4" do
113+
it 'connects over IPv4 when only the IPv4 address is listening' do
114+
@client = Socket.tcp('localhost', @port, connect_timeout: 10)
115+
116+
@client.remote_address.ip_address.should == '127.0.0.1'
117+
@client.write('hello').should == 5
118+
119+
connection = @server.accept
120+
begin
121+
connection.read(5).should == 'hello'
122+
ensure
123+
connection.close
124+
end
123125
end
124126
end
125127
end

0 commit comments

Comments
 (0)