Ruby 写文件 outFile = File.new("fileName.txt","w") outFile.puts "a" outFile.close 转载于:https://www.cnblogs.com/stono/p/6666081.html