Skip to content

Commit 8e250c5

Browse files
committed
Removed Solaris conditions from library directory
1 parent d3665a6 commit 8e250c5

17 files changed

Lines changed: 77 additions & 107 deletions

library/socket/addrinfo/getaddrinfo_spec.rb

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,15 @@
7373
end
7474
end
7575

76-
platform_is_not :'solaris2.10' do # i386-solaris
77-
it 'sets a custom socket protocol of the Addrinfo instances' do
78-
array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
76+
it 'sets a custom socket protocol of the Addrinfo instances' do
77+
array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
7978

80-
array[0].protocol.should == Socket::IPPROTO_UDP
81-
end
79+
array[0].protocol.should == Socket::IPPROTO_UDP
8280
end
8381

84-
platform_is_not :solaris do
85-
it 'sets the canonical name when AI_CANONNAME is given as a flag' do
86-
array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
82+
it 'sets the canonical name when AI_CANONNAME is given as a flag' do
83+
array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
8784

88-
array[0].canonname.should be_an_instance_of(String)
89-
end
85+
array[0].canonname.should be_an_instance_of(String)
9086
end
9187
end

library/socket/addrinfo/initialize_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@
362362
end
363363
end
364364

365-
platform_is_not :windows, :aix, :solaris do
365+
platform_is_not :windows, :aix do
366366
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
367367
it "raises SocketError when using #{type}" do
368368
value = Socket.const_get(type)
@@ -390,7 +390,7 @@
390390
end
391391
end
392392

393-
platform_is_not :windows, :aix, :solaris do
393+
platform_is_not :windows, :aix do
394394
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
395395
it "raises SocketError when using #{type}" do
396396
value = Socket.const_get(type)
@@ -495,7 +495,7 @@
495495
end
496496
end
497497

498-
platform_is_not :windows, :aix, :solaris do
498+
platform_is_not :windows, :aix do
499499
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
500500
it "raises SocketError when using #{type}" do
501501
value = Socket.const_get(type)

library/socket/addrinfo/marshal_dump_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,8 @@
3232
@array[3].should == 'SOCK_STREAM'
3333
end
3434

35-
platform_is_not :'solaris2.10' do # i386-solaris
36-
it 'includes the protocol as the 5th value' do
37-
@array[4].should == 'IPPROTO_TCP'
38-
end
35+
it 'includes the protocol as the 5th value' do
36+
@array[4].should == 'IPPROTO_TCP'
3937
end
4038

4139
it 'includes the canonical name as the 6th value' do

library/socket/addrinfo/udp_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@
2727
Addrinfo.udp(ip_address, 80).socktype.should == Socket::SOCK_DGRAM
2828
end
2929

30-
platform_is_not :solaris do
31-
it 'sets the socket protocol' do
32-
Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP
33-
end
30+
it 'sets the socket protocol' do
31+
Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP
3432
end
3533
end
3634
end

library/socket/ancillarydata/initialize_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
Socket::AncillaryData.new(:INET, :SOCKET, :RIGHTS, '').type.should == Socket::SCM_RIGHTS
107107
end
108108

109-
platform_is_not :"solaris2.10", :aix do
109+
platform_is_not :aix do
110110
it 'sets the type to SCM_TIMESTAMP when using :TIMESTAMP as the type argument' do
111111
Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '').type.should == Socket::SCM_TIMESTAMP
112112
end

library/socket/ancillarydata/unix_rights_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
-> { data.unix_rights }.should raise_error(TypeError)
5151
end
5252

53-
platform_is_not :"solaris2.10", :aix do
53+
platform_is_not :aix do
5454
it 'raises TypeError when the type is not SCM_RIGHTS' do
5555
data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '')
5656

library/socket/basicsocket/recv_spec.rb

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,26 @@
3232
ScratchPad.recorded.should == 'hello'
3333
end
3434

35-
platform_is_not :solaris do
36-
it "accepts flags to specify unusual receiving behaviour" do
37-
t = Thread.new do
38-
client = @server.accept
35+
it "accepts flags to specify unusual receiving behaviour" do
36+
t = Thread.new do
37+
client = @server.accept
3938

40-
# in-band data (TCP), doesn't receive the flag.
41-
ScratchPad.record client.recv(10)
39+
# in-band data (TCP), doesn't receive the flag.
40+
ScratchPad.record client.recv(10)
4241

43-
# this recv is important (TODO: explain)
44-
client.recv(10)
45-
client.close
46-
end
47-
Thread.pass while t.status and t.status != "sleep"
48-
t.status.should_not be_nil
49-
50-
socket = TCPSocket.new('127.0.0.1', @port)
51-
socket.send('helloU', Socket::MSG_OOB)
52-
socket.shutdown(1)
53-
t.join
54-
socket.close
55-
ScratchPad.recorded.should == 'hello'
42+
# this recv is important (TODO: explain)
43+
client.recv(10)
44+
client.close
5645
end
46+
Thread.pass while t.status and t.status != "sleep"
47+
t.status.should_not be_nil
48+
49+
socket = TCPSocket.new('127.0.0.1', @port)
50+
socket.send('helloU', Socket::MSG_OOB)
51+
socket.shutdown(1)
52+
t.join
53+
socket.close
54+
ScratchPad.recorded.should == 'hello'
5755
end
5856

5957
it "gets lines delimited with a custom separator" do

library/socket/basicsocket/send_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
data.should == 'hello'
3939
end
4040

41-
platform_is_not :solaris, :windows do
41+
platform_is_not :windows do
4242
it "accepts flags to specify unusual sending behaviour" do
4343
data = nil
4444
peek_data = nil

library/socket/constants/constants_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
end
6969
end
7070

71-
platform_is_not :solaris, :windows, :aix, :android do
71+
platform_is_not :windows, :aix, :android do
7272
it "defines multicast options" do
7373
consts = ["IP_MAX_MEMBERSHIPS"]
7474
consts.each do |c|

library/socket/shared/pack_sockaddr.rb

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '0.0.0.0']
2323
end
2424

25-
platform_is_not :solaris do
26-
it 'resolves the service name to a port' do
27-
sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1')
28-
Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1']
29-
end
25+
it 'resolves the service name to a port' do
26+
sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1')
27+
Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1']
3028
end
3129

3230
describe 'using an IPv4 address' do
@@ -38,25 +36,12 @@
3836
end
3937
end
4038

41-
platform_is_not :solaris do
42-
describe 'using an IPv6 address' do
43-
it 'returns a String of 28 bytes' do
44-
str = Socket.public_send(@method, 80, '::1')
39+
describe 'using an IPv6 address' do
40+
it 'returns a String of 28 bytes' do
41+
str = Socket.public_send(@method, 80, '::1')
4542

46-
str.should be_an_instance_of(String)
47-
str.bytesize.should == 28
48-
end
49-
end
50-
end
51-
52-
platform_is :solaris do
53-
describe 'using an IPv6 address' do
54-
it 'returns a String of 32 bytes' do
55-
str = Socket.public_send(@method, 80, '::1')
56-
57-
str.should be_an_instance_of(String)
58-
str.bytesize.should == 32
59-
end
43+
str.should be_an_instance_of(String)
44+
str.bytesize.should == 28
6045
end
6146
end
6247
end

0 commit comments

Comments
 (0)