diff options
| author | Benoit Daloze <eregontp@gmail.com> | 2026-01-28 22:30:21 +0100 |
|---|---|---|
| committer | Benoit Daloze <eregontp@gmail.com> | 2026-01-28 23:01:22 +0100 |
| commit | dbd2ff7adca9b49e4bfa7bc3ec8b83bd437f8cb7 (patch) | |
| tree | 5f4f1609d2015fde92c25b175b84078dfcf1c92f /spec/ruby/library/socket/ipsocket | |
| parent | a8b877a843643fbdccd1a42efaf94ad27705dd55 (diff) | |
Update to ruby/spec@83e26c9
Diffstat (limited to 'spec/ruby/library/socket/ipsocket')
| -rw-r--r-- | spec/ruby/library/socket/ipsocket/recvfrom_spec.rb | 44 |
1 files changed, 11 insertions, 33 deletions
diff --git a/spec/ruby/library/socket/ipsocket/recvfrom_spec.rb b/spec/ruby/library/socket/ipsocket/recvfrom_spec.rb index b58903df23..5e6a145c9b 100644 --- a/spec/ruby/library/socket/ipsocket/recvfrom_spec.rb +++ b/spec/ruby/library/socket/ipsocket/recvfrom_spec.rb @@ -83,43 +83,21 @@ describe "Socket::IPSocket#recvfrom" do @client.close unless @client.closed? end - ruby_version_is ""..."3.3" do - it "returns an empty String as received data on a closed stream socket" do - t = Thread.new do - client = @server.accept - message = client.recvfrom(10) - message - ensure - client.close if client - end - - Thread.pass while t.status and t.status != "sleep" - t.status.should_not be_nil - - @client.close - - t.value.should.is_a? Array - t.value[0].should == "" + it "returns nil on a closed stream socket" do + t = Thread.new do + client = @server.accept + message = client.recvfrom(10) + message + ensure + client.close if client end - end - - ruby_version_is "3.3" do - it "returns nil on a closed stream socket" do - t = Thread.new do - client = @server.accept - message = client.recvfrom(10) - message - ensure - client.close if client - end - Thread.pass while t.status and t.status != "sleep" - t.status.should_not be_nil + Thread.pass while t.status and t.status != "sleep" + t.status.should_not be_nil - @client.close + @client.close - t.value.should be_nil - end + t.value.should be_nil end end |
