defunkt/fakefs — pull request #157 by sometimesfood (2012-11-17 17:52:22+00:00)
Title: Add support for nil user/group to chownChown nil support

# Add support for nil user/group to chown

FakeFS::File.chown, FakeFS::FileUtils.chown and FakeFS::File#chown should support nil user and group, just like their Ruby core/standard lib equivalents.

This should work (but currently doesn't):

```ruby
FileUtils.touch 'foo'
FileUtils.chown 0, 0, 'foo'
FileUtils.chown nil, nil, 'foo'
File.stat('foo').uid
# => 0
File.stat('foo').gid
# => 0
```

(FakeFS currently raises a TypeError: `TypeError: can't convert nil into String`.)

## References

* http://www.ruby-doc.org/core-1.9.3/File.html#method-i-chown
* http://www.ruby-doc.org/core-1.9.3/File.html#method-c-chown
* http://www.ruby-doc.org/stdlib-1.9.3/libdoc/fileutils/rdoc/FileUtils.html#method-c-chown