After opening a file with File.new(big_file) (without closing it) 1016 times (Ubuntu) or 1017 times (CentOS), it seems there is a limit and it raises:
Too many open files @ rb_sysopen - big_file (Errno::EMFILE)
Is there any way to raise that limit?
On my systems, ulimit is set to unlimited.