1: Dir.entries("E:\\path\\").each{ |e| puts e} 打印 2:元编程: 就是代码生成,让程序自动生成代码,避免了程序员自己全部手写代码 转载于:https://blog.51cto.com/athinkingreed/758673