3 ms·
Wow, this is really sweet and esoteric (didn't know about ARGF) - but, reading the docs for ARGF, wouldn't it also try to ready from ARGV[1]? Maybe this would
by danmaz74 13y ago
Wow, this is really sweet and esoteric (didn't know about ARGF) - but, reading the docs for ARGF, wouldn't it also try to ready from ARGV[1]?
Maybe this would fix it:
IO.write(ARGV.pop, ARGF.lines.sort.join('\n'))