RubyMine warns me about negative condition here:
while !open_socket do
sleep 1
end
I know that unless is an opposite to if, but what is the opposite to while ?
There is until:
until open_socket do
sleep 1
end
If there is only one line in it, you could also write as:
sleep 1 until open_socket
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With