IO.for_fd is not an instance method but a class method.
IO.new must accept 3rd argument (though it's ignored).