当我尝试这段代码时,
require "socket"
begin
p Socket.ip_address_list
rescue Exception => e
p "#{e.class} #{e.message}"
end
代码运行并输出 this
"SocketError getnameinfo: Either the application has not called WSAStartup, or WSAStartup failed. "
我正在使用 $ LOADED_FEATURES 运行代码
["enumerator.so", "thread.rb", "rational.so", "complex.so", "C:/Ruby23-x64/lib/ruby/2.3.0/x64-mingw32/socket.so", "C:/Ruby23-x64/lib/ruby/2.3.0/x64-mingw32/io/wait.so", "C:/Ruby23-x64/lib/ruby/2.3.0/socket.rb"]
我该如何解决?请帮我...
注意:我使用 c++ 调用 ruby 代码运行代码