shurizzle/ruby-mkfifo — pull request #1 by Quintus (2012-07-14 13:49:12+00:00)
Title: Use IOError instead of exception, support Pathname and documentation

File.mkfifo used Ruby’s `Exception` class directly to signal an error, but this class shouldn’t be used directly for exception raising. Primary reason:

begin
File.mkfifo("myfifo")
rescue
puts "Never get here"
end

This fails to execute the `rescue` clause if the ::mkfifo method raises `Exception`, because Ruby’s default `rescue` handler just rescues from `StandardError`. I replaced the exception with `IOError`, which seems more appropriate for this case and is rescued by a default rescue.

Apart from that, I’ve changed the `ArgumentError` exception thrown on incorrect types to the more intuitive `TypeError` and added support for `Pathname` objects, i.e. the ::mkfifo method now accepts Strings as well as Pathnames (Ruby’s default `File` class methods do this as well). Finally, I added RDoc documentation so the gem is browsable on the local RubyGems documentation server.

Last but not least I want to urge you to add licensing information to the code, because the way it is currently nobody is actually allowed to use your library. Just add a short statement, even if you just copy-paste the [MIT license](http://opensource.org/licenses/MIT) from OSI.

Vale,
Quintus