File::NULL is 1.9.3 feature
Ignoring encoding option is 1.8.7 feature
Use IO.autoclose on 1.9+ for fdopen

see also c02c78b3899fcf769084a88777c63de0fcebb48d