summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2025-04-02 14:52:22 +0900
committerHiroshi SHIBATA <[email protected]>2025-04-02 16:24:47 +0900
commit3d4ea45411cba9d14f061aa5a26a0e146f3d7304 (patch)
tree6e30605550b013c65e897b73679d6ae2470469c7
parent8cb61b00fd0c5e87163703fc93e5303ca413b79e (diff)
Removed Solaris conditions from library directory
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/13037
-rw-r--r--spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb16
-rw-r--r--spec/ruby/library/socket/addrinfo/initialize_spec.rb6
-rw-r--r--spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb6
-rw-r--r--spec/ruby/library/socket/addrinfo/udp_spec.rb6
-rw-r--r--spec/ruby/library/socket/ancillarydata/initialize_spec.rb2
-rw-r--r--spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb2
-rw-r--r--spec/ruby/library/socket/basicsocket/recv_spec.rb36
-rw-r--r--spec/ruby/library/socket/basicsocket/send_spec.rb2
-rw-r--r--spec/ruby/library/socket/constants/constants_spec.rb2
-rw-r--r--spec/ruby/library/socket/shared/pack_sockaddr.rb31
-rw-r--r--spec/ruby/library/socket/socket/connect_nonblock_spec.rb58
-rw-r--r--spec/ruby/library/socket/socket/getaddrinfo_spec.rb2
-rw-r--r--spec/ruby/library/socket/socket/gethostbyaddr_spec.rb7
-rw-r--r--spec/ruby/library/socket/socket/getifaddrs_spec.rb2
-rw-r--r--spec/ruby/library/syslog/constants_spec.rb2
-rw-r--r--spec/ruby/library/syslog/log_spec.rb2
-rw-r--r--spec/ruby/library/syslog/shared/log.rb2
17 files changed, 77 insertions, 107 deletions
diff --git a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
index 67fad73815..e05fe9967a 100644
--- a/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
+++ b/spec/ruby/library/socket/addrinfo/getaddrinfo_spec.rb
@@ -73,19 +73,15 @@ describe 'Addrinfo.getaddrinfo' do
end
end
- platform_is_not :'solaris2.10' do # i386-solaris
- it 'sets a custom socket protocol of the Addrinfo instances' do
- array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
+ it 'sets a custom socket protocol of the Addrinfo instances' do
+ array = Addrinfo.getaddrinfo('127.0.0.1', 80, nil, nil, Socket::IPPROTO_UDP)
- array[0].protocol.should == Socket::IPPROTO_UDP
- end
+ array[0].protocol.should == Socket::IPPROTO_UDP
end
- platform_is_not :solaris do
- it 'sets the canonical name when AI_CANONNAME is given as a flag' do
- array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
+ it 'sets the canonical name when AI_CANONNAME is given as a flag' do
+ array = Addrinfo.getaddrinfo('localhost', 80, nil, nil, nil, Socket::AI_CANONNAME)
- array[0].canonname.should be_an_instance_of(String)
- end
+ array[0].canonname.should be_an_instance_of(String)
end
end
diff --git a/spec/ruby/library/socket/addrinfo/initialize_spec.rb b/spec/ruby/library/socket/addrinfo/initialize_spec.rb
index d8885c5d62..b7477efc79 100644
--- a/spec/ruby/library/socket/addrinfo/initialize_spec.rb
+++ b/spec/ruby/library/socket/addrinfo/initialize_spec.rb
@@ -362,7 +362,7 @@ describe "Addrinfo#initialize" do
end
end
- platform_is_not :windows, :aix, :solaris do
+ platform_is_not :windows, :aix do
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
it "raises SocketError when using #{type}" do
value = Socket.const_get(type)
@@ -390,7 +390,7 @@ describe "Addrinfo#initialize" do
end
end
- platform_is_not :windows, :aix, :solaris do
+ platform_is_not :windows, :aix do
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
it "raises SocketError when using #{type}" do
value = Socket.const_get(type)
@@ -495,7 +495,7 @@ describe "Addrinfo#initialize" do
end
end
- platform_is_not :windows, :aix, :solaris do
+ platform_is_not :windows, :aix do
(Socket.constants.grep(/^IPPROTO/) - valid).each do |type|
it "raises SocketError when using #{type}" do
value = Socket.const_get(type)
diff --git a/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb b/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb
index c4220a6f3e..2d69a33b53 100644
--- a/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb
+++ b/spec/ruby/library/socket/addrinfo/marshal_dump_spec.rb
@@ -32,10 +32,8 @@ describe 'Addrinfo#marshal_dump' do
@array[3].should == 'SOCK_STREAM'
end
- platform_is_not :'solaris2.10' do # i386-solaris
- it 'includes the protocol as the 5th value' do
- @array[4].should == 'IPPROTO_TCP'
- end
+ it 'includes the protocol as the 5th value' do
+ @array[4].should == 'IPPROTO_TCP'
end
it 'includes the canonical name as the 6th value' do
diff --git a/spec/ruby/library/socket/addrinfo/udp_spec.rb b/spec/ruby/library/socket/addrinfo/udp_spec.rb
index b05cbf9b0b..ac02e76ef5 100644
--- a/spec/ruby/library/socket/addrinfo/udp_spec.rb
+++ b/spec/ruby/library/socket/addrinfo/udp_spec.rb
@@ -27,10 +27,8 @@ describe 'Addrinfo.udp' do
Addrinfo.udp(ip_address, 80).socktype.should == Socket::SOCK_DGRAM
end
- platform_is_not :solaris do
- it 'sets the socket protocol' do
- Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP
- end
+ it 'sets the socket protocol' do
+ Addrinfo.udp(ip_address, 80).protocol.should == Socket::IPPROTO_UDP
end
end
end
diff --git a/spec/ruby/library/socket/ancillarydata/initialize_spec.rb b/spec/ruby/library/socket/ancillarydata/initialize_spec.rb
index 344d1485c5..eca45599d7 100644
--- a/spec/ruby/library/socket/ancillarydata/initialize_spec.rb
+++ b/spec/ruby/library/socket/ancillarydata/initialize_spec.rb
@@ -106,7 +106,7 @@ with_feature :ancillary_data do
Socket::AncillaryData.new(:INET, :SOCKET, :RIGHTS, '').type.should == Socket::SCM_RIGHTS
end
- platform_is_not :"solaris2.10", :aix do
+ platform_is_not :aix do
it 'sets the type to SCM_TIMESTAMP when using :TIMESTAMP as the type argument' do
Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '').type.should == Socket::SCM_TIMESTAMP
end
diff --git a/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb b/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb
index 65ffcb01af..95052fd91c 100644
--- a/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb
+++ b/spec/ruby/library/socket/ancillarydata/unix_rights_spec.rb
@@ -50,7 +50,7 @@ with_feature :ancillary_data do
-> { data.unix_rights }.should raise_error(TypeError)
end
- platform_is_not :"solaris2.10", :aix do
+ platform_is_not :aix do
it 'raises TypeError when the type is not SCM_RIGHTS' do
data = Socket::AncillaryData.new(:INET, :SOCKET, :TIMESTAMP, '')
diff --git a/spec/ruby/library/socket/basicsocket/recv_spec.rb b/spec/ruby/library/socket/basicsocket/recv_spec.rb
index e20c571922..40033a5f5d 100644
--- a/spec/ruby/library/socket/basicsocket/recv_spec.rb
+++ b/spec/ruby/library/socket/basicsocket/recv_spec.rb
@@ -32,28 +32,26 @@ describe "BasicSocket#recv" do
ScratchPad.recorded.should == 'hello'
end
- platform_is_not :solaris do
- it "accepts flags to specify unusual receiving behaviour" do
- t = Thread.new do
- client = @server.accept
+ it "accepts flags to specify unusual receiving behaviour" do
+ t = Thread.new do
+ client = @server.accept
- # in-band data (TCP), doesn't receive the flag.
- ScratchPad.record client.recv(10)
+ # in-band data (TCP), doesn't receive the flag.
+ ScratchPad.record client.recv(10)
- # this recv is important (TODO: explain)
- client.recv(10)
- client.close
- end
- Thread.pass while t.status and t.status != "sleep"
- t.status.should_not be_nil
-
- socket = TCPSocket.new('127.0.0.1', @port)
- socket.send('helloU', Socket::MSG_OOB)
- socket.shutdown(1)
- t.join
- socket.close
- ScratchPad.recorded.should == 'hello'
+ # this recv is important (TODO: explain)
+ client.recv(10)
+ client.close
end
+ Thread.pass while t.status and t.status != "sleep"
+ t.status.should_not be_nil
+
+ socket = TCPSocket.new('127.0.0.1', @port)
+ socket.send('helloU', Socket::MSG_OOB)
+ socket.shutdown(1)
+ t.join
+ socket.close
+ ScratchPad.recorded.should == 'hello'
end
it "gets lines delimited with a custom separator" do
diff --git a/spec/ruby/library/socket/basicsocket/send_spec.rb b/spec/ruby/library/socket/basicsocket/send_spec.rb
index 36da125279..25ba3f5655 100644
--- a/spec/ruby/library/socket/basicsocket/send_spec.rb
+++ b/spec/ruby/library/socket/basicsocket/send_spec.rb
@@ -38,7 +38,7 @@ describe "BasicSocket#send" do
data.should == 'hello'
end
- platform_is_not :solaris, :windows do
+ platform_is_not :windows do
it "accepts flags to specify unusual sending behaviour" do
data = nil
peek_data = nil
diff --git a/spec/ruby/library/socket/constants/constants_spec.rb b/spec/ruby/library/socket/constants/constants_spec.rb
index 637bc6740a..b9a9d42725 100644
--- a/spec/ruby/library/socket/constants/constants_spec.rb
+++ b/spec/ruby/library/socket/constants/constants_spec.rb
@@ -68,7 +68,7 @@ describe "Socket::Constants" do
end
end
- platform_is_not :solaris, :windows, :aix, :android do
+ platform_is_not :windows, :aix, :android do
it "defines multicast options" do
consts = ["IP_MAX_MEMBERSHIPS"]
consts.each do |c|
diff --git a/spec/ruby/library/socket/shared/pack_sockaddr.rb b/spec/ruby/library/socket/shared/pack_sockaddr.rb
index 26fdf682b1..f309aa02c7 100644
--- a/spec/ruby/library/socket/shared/pack_sockaddr.rb
+++ b/spec/ruby/library/socket/shared/pack_sockaddr.rb
@@ -22,11 +22,9 @@ describe :socket_pack_sockaddr_in, shared: true do
Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '0.0.0.0']
end
- platform_is_not :solaris do
- it 'resolves the service name to a port' do
- sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1')
- Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1']
- end
+ it 'resolves the service name to a port' do
+ sockaddr_in = Socket.public_send(@method, 'http', '127.0.0.1')
+ Socket.unpack_sockaddr_in(sockaddr_in).should == [80, '127.0.0.1']
end
describe 'using an IPv4 address' do
@@ -38,25 +36,12 @@ describe :socket_pack_sockaddr_in, shared: true do
end
end
- platform_is_not :solaris do
- describe 'using an IPv6 address' do
- it 'returns a String of 28 bytes' do
- str = Socket.public_send(@method, 80, '::1')
+ describe 'using an IPv6 address' do
+ it 'returns a String of 28 bytes' do
+ str = Socket.public_send(@method, 80, '::1')
- str.should be_an_instance_of(String)
- str.bytesize.should == 28
- end
- end
- end
-
- platform_is :solaris do
- describe 'using an IPv6 address' do
- it 'returns a String of 32 bytes' do
- str = Socket.public_send(@method, 80, '::1')
-
- str.should be_an_instance_of(String)
- str.bytesize.should == 32
- end
+ str.should be_an_instance_of(String)
+ str.bytesize.should == 28
end
end
end
diff --git a/spec/ruby/library/socket/socket/connect_nonblock_spec.rb b/spec/ruby/library/socket/socket/connect_nonblock_spec.rb
index 3cf667fc4a..359b8719fb 100644
--- a/spec/ruby/library/socket/socket/connect_nonblock_spec.rb
+++ b/spec/ruby/library/socket/socket/connect_nonblock_spec.rb
@@ -16,42 +16,40 @@ describe "Socket#connect_nonblock" do
@thread.join if @thread
end
- platform_is_not :solaris do
- it "connects the socket to the remote side" do
- port = nil
- accept = false
- @thread = Thread.new do
- server = TCPServer.new(@hostname, 0)
- port = server.addr[1]
- Thread.pass until accept
- conn = server.accept
- conn << "hello!"
- conn.close
- server.close
- end
-
- Thread.pass until port
+ it "connects the socket to the remote side" do
+ port = nil
+ accept = false
+ @thread = Thread.new do
+ server = TCPServer.new(@hostname, 0)
+ port = server.addr[1]
+ Thread.pass until accept
+ conn = server.accept
+ conn << "hello!"
+ conn.close
+ server.close
+ end
- addr = Socket.sockaddr_in(port, @hostname)
- begin
- @socket.connect_nonblock(addr)
- rescue Errno::EINPROGRESS
- end
+ Thread.pass until port
- accept = true
- IO.select nil, [@socket]
+ addr = Socket.sockaddr_in(port, @hostname)
+ begin
+ @socket.connect_nonblock(addr)
+ rescue Errno::EINPROGRESS
+ end
- begin
- @socket.connect_nonblock(addr)
- rescue Errno::EISCONN
- # Not all OS's use this errno, so we trap and ignore it
- end
+ accept = true
+ IO.select nil, [@socket]
- @socket.read(6).should == "hello!"
+ begin
+ @socket.connect_nonblock(addr)
+ rescue Errno::EISCONN
+ # Not all OS's use this errno, so we trap and ignore it
end
+
+ @socket.read(6).should == "hello!"
end
- platform_is_not :freebsd, :solaris, :aix do
+ platform_is_not :freebsd, :aix do
it "raises Errno::EINPROGRESS when the connect would block" do
-> do
@socket.connect_nonblock(@addr)
@@ -135,7 +133,7 @@ describe 'Socket#connect_nonblock' do
end
end
- platform_is_not :freebsd, :solaris do
+ platform_is_not :freebsd do
it 'raises IO:EINPROGRESSWaitWritable when the connection would block' do
@server.bind(@sockaddr)
diff --git a/spec/ruby/library/socket/socket/getaddrinfo_spec.rb b/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
index e0eff3cef4..9f049597d0 100644
--- a/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
+++ b/spec/ruby/library/socket/socket/getaddrinfo_spec.rb
@@ -11,7 +11,7 @@ describe "Socket.getaddrinfo" do
BasicSocket.do_not_reverse_lookup = @do_not_reverse_lookup
end
- platform_is_not :solaris, :windows do
+ platform_is_not :windows do
it "gets the address information" do
expected = []
# The check for AP_INET6's class is needed because ipaddr.rb adds
diff --git a/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb b/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb
index a4c8355520..5d936046f5 100644
--- a/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb
+++ b/spec/ruby/library/socket/socket/gethostbyaddr_spec.rb
@@ -18,11 +18,8 @@ describe 'Socket.gethostbyaddr' do
@array = suppress_warning { Socket.gethostbyaddr(@addr) }
end
- # RubyCI Solaris 11x defines 127.0.0.1 as unstable11x
- platform_is_not :"solaris2.11" do
- it 'includes the hostname as the first value' do
- @array[0].should == SocketSpecs.hostname_reverse_lookup
- end
+ it 'includes the hostname as the first value' do
+ @array[0].should == SocketSpecs.hostname_reverse_lookup
end
it 'includes the aliases as the 2nd value' do
diff --git a/spec/ruby/library/socket/socket/getifaddrs_spec.rb b/spec/ruby/library/socket/socket/getifaddrs_spec.rb
index 7df542abe6..839854ea27 100644
--- a/spec/ruby/library/socket/socket/getifaddrs_spec.rb
+++ b/spec/ruby/library/socket/socket/getifaddrs_spec.rb
@@ -1,6 +1,6 @@
require_relative '../spec_helper'
-platform_is_not :aix, :"solaris2.10" do
+platform_is_not :aix do
describe 'Socket.getifaddrs' do
before do
@ifaddrs = Socket.getifaddrs
diff --git a/spec/ruby/library/syslog/constants_spec.rb b/spec/ruby/library/syslog/constants_spec.rb
index 2b9524c53d..fc9db47dd8 100644
--- a/spec/ruby/library/syslog/constants_spec.rb
+++ b/spec/ruby/library/syslog/constants_spec.rb
@@ -4,7 +4,7 @@ platform_is_not :windows do
require 'syslog'
describe "Syslog::Constants" do
- platform_is_not :windows, :solaris, :aix do
+ platform_is_not :windows, :aix do
before :all do
@constants = %w(LOG_AUTHPRIV LOG_USER LOG_LOCAL2 LOG_NOTICE LOG_NDELAY
LOG_SYSLOG LOG_ALERT LOG_FTP LOG_LOCAL5 LOG_ERR LOG_AUTH
diff --git a/spec/ruby/library/syslog/log_spec.rb b/spec/ruby/library/syslog/log_spec.rb
index 8589fb1f73..0c855b8257 100644
--- a/spec/ruby/library/syslog/log_spec.rb
+++ b/spec/ruby/library/syslog/log_spec.rb
@@ -4,7 +4,7 @@ platform_is_not :windows do
require 'syslog'
describe "Syslog.log" do
- platform_is_not :windows, :darwin, :solaris, :aix, :android do
+ platform_is_not :windows, :darwin, :aix, :android do
before :each do
Syslog.opened?.should be_false
diff --git a/spec/ruby/library/syslog/shared/log.rb b/spec/ruby/library/syslog/shared/log.rb
index 12e4ea8366..9f9302b214 100644
--- a/spec/ruby/library/syslog/shared/log.rb
+++ b/spec/ruby/library/syslog/shared/log.rb
@@ -1,5 +1,5 @@
describe :syslog_log, shared: true do
- platform_is_not :windows, :darwin, :solaris, :aix, :android do
+ platform_is_not :windows, :darwin, :aix, :android do
before :each do
Syslog.opened?.should be_false
end