module FakeFS
  # FakeFS IO class inherit root IO
  # Only minimal mocks are provided as IO may be used by ruby's internals
  class IO < ::IO
    # Redirects ::IO.binread to ::FakeFS::File.read
    def self.binread(*args, **keywords)
      ::FakeFS::File.binread(*args, **keywords)
    end

    # Redirects ::IO.read to ::FakeFS::File.read
    def self.read(*args, **keywords)
      ::FakeFS::File.read(*args, **keywords)
    end

    # Redirects ::IO.write to ::FakeFS::File.write
    def self.write(*args, **keywords)
      ::FakeFS::File.write(*args, **keywords)
    end
  end
end

module FakeFS
  # FakeFS IO class inherit root IO
  # Only minimal mocks are provided as IO may be used by ruby's internals
  class IO < ::IO
    # Redirects ::IO.binread to ::FakeFS::File.binread
    def self.binread(*args)
      ::FakeFS::File.binread(*args)
    end

    # Redirects ::IO.read to ::FakeFS::File.read
    def self.read(*args)
      ::FakeFS::File.read(*args)
    end

    # Redirects ::IO.write to ::FakeFS::File.write
    def self.write(*args)
      ::FakeFS::File.write(*args)
    end
  end
end

Simplify params forwarding for IO mocks
Simplify params forwarding for IO mocks

There is no keyword parameters on read, binread & write methods.
Let's just pass the *args, especially since the double splat operator
changed a bit between ruby 2.6 and 2.7.
