mirror of
https://github.com/cyberarm/w3d_hub_linux_launcher.git
synced 2025-12-16 09:12:35 +00:00
Renamed W3DHub.captured_command to simply W3DHub.command, replace usages of system with W3DHub.command, resolves command prompt's popping up on Windows under rubyw.
This commit is contained in:
@@ -49,7 +49,7 @@ class W3DHub
|
||||
lambda do
|
||||
@ping = -1
|
||||
|
||||
W3DHub.captured_commmand("ping #{@address} #{W3DHub.windows? ? '-n 3' : '-c 3'}") do |line|
|
||||
W3DHub.command("ping #{@address} #{W3DHub.windows? ? '-n 3' : '-c 3'}") do |line|
|
||||
if W3DHub.windows? && line =~ /Minimum|Maximum|Maximum/i
|
||||
@ping = line.strip.split(",").last.split("=").last.sub("ms", "").to_i
|
||||
elsif W3DHub.unix? && line.start_with?("rtt min/avg/max/mdev")
|
||||
|
||||
Reference in New Issue
Block a user