- require "Win32API"
- def system(cmd)
- sys = Win32API.new("crtdll", "system", ['P'], 'L')
- sys.Call(cmd)
- end
- system("dir") # cmd /c not needed!
- #该片段来自于http://www.codesnippet.cn/detail/040220132093.html
来源: http://www.codesnippet.cn/detail/040220132093.html