File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ def teardown
39
39
end
40
40
41
41
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 )
43
44
@starttls_executed = false
44
45
@server_thread = Thread . new ( @server_socket ) do |s |
45
46
s . puts "220 fakeserver\r \n "
@@ -125,4 +126,4 @@ def test_start_without_tls_hostname
125
126
end
126
127
127
128
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
25
25
end
26
26
27
27
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 )
29
30
@starttls_executed = false
30
31
@server_thread = Thread . new ( @server_socket ) do |s |
31
32
s . puts "220 fakeserver\r \n "
@@ -118,4 +119,4 @@ def test_enable_starttls_and_enable_starttls_auto
118
119
assert_nothing_raised { smtp . enable_starttls_auto }
119
120
end
120
121
end
121
- end unless /mswin|mingw/ =~ RUBY_PLATFORM
122
+ end
You can’t perform that action at this time.
0 commit comments