
Code: Select all
irb(main):066:0> File.open("../r.png",File::WRONLY|File::TRUNC|File::CREAT){|ofile|
irb(main):067:1* Dir.glob("**/*txt").sort.each{|filename|
irb(main):068:2* ofile.putc File.size(filename)
irb(main):069:2> }}
Code: Select all
irb(main):066:0> File.open("../r.png",File::WRONLY|File::TRUNC|File::CREAT){|ofile|
irb(main):067:1* Dir.glob("**/*txt").sort.each{|filename|
irb(main):068:2* ofile.putc File.size(filename)
irb(main):069:2> }}