This post originated from an RSS feed registered with Ruby Buzz
by Daniel Berger.
Original Post: File.null and other stuff
Feed Title: Testing 1,2,3...
Feed URL: http://djberg96.livejournal.com/data/rss
Feed Description: A blog on Ruby and other stuff.
Weary with that idiom, and tired of seeing people hard coding '/dev/null' in their programs, I decided to bring up the idea of a 'bitbucket' method for the Dir class. After some debate the consensus seemed to be that such a method should be in the File class and shouldn't use a colloquial term like 'bitbucket'.
Unfortunately, there was no consensus as to *where* to put it, so I decided to just stick a File.null method in my ptools package and release it on my own. It adds a bunch of methods to the File class already, so it seemed the logical choice.
I also stole Ryan Davis' idea (and most of the code) for a File.binary? method as well.