News for hackers. Stuff that matters.
Re:C++ has become a scripting language by danmaz74 on Wednesday October 16, 2013 @08:48AM (#6559333)
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'))
Re:C++ has become a scripting language by Freaky on Wednesday October 16, 2013 @09:54AM (#6559620)
Yes, good catch. join('\n') is wrong though - IO#lines preserves newlines, the default join is the empty string, and you meant "\n" :)
Re:C++ has become a scripting language by danmaz74 on Wednesday October 16, 2013 @11:14AM (#6560089)
:)