File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ def teardown
3939 end
4040
4141 def start_smtpd ( starttls )
42- @server_socket , @client_socket = UNIXSocket . pair
42+ @server_socket , @client_socket = Object . const_defined? ( :UNIXSocket ) ?
43+ UNIXSocket . pair : Socket . pair ( :INET , :STREAM , 0 )
4344 @starttls_executed = false
4445 @server_thread = Thread . new ( @server_socket ) do |s |
4546 s . puts "220 fakeserver\r \n "
@@ -125,4 +126,4 @@ def test_start_without_tls_hostname
125126 end
126127
127128 end
128- end unless /mswin|mingw/ =~ RUBY_PLATFORM
129+ end
Original file line number Diff line number Diff line change @@ -25,7 +25,8 @@ def teardown
2525 end
2626
2727 def start_smtpd ( starttls )
28- @server_socket , @client_socket = UNIXSocket . pair
28+ @server_socket , @client_socket = Object . const_defined? ( :UNIXSocket ) ?
29+ UNIXSocket . pair : Socket . pair ( :INET , :STREAM , 0 )
2930 @starttls_executed = false
3031 @server_thread = Thread . new ( @server_socket ) do |s |
3132 s . puts "220 fakeserver\r \n "
@@ -118,4 +119,4 @@ def test_enable_starttls_and_enable_starttls_auto
118119 assert_nothing_raised { smtp . enable_starttls_auto }
119120 end
120121 end
121- end unless /mswin|mingw/ =~ RUBY_PLATFORM
122+ end
You can’t perform that action at this time.
0 commit comments