defunkt/tomdoc — pull request #27 by miyagawa (2012-11-21 19:14:12+00:00)
Title: Hanlde empty TomDoc comment as an empty string

When you call `.tomdoc` on a method without any TomDoc documentation, the method will throw errors:

```
NoMethodError: undefined method `sub' for nil:NilClass
.../tomdoc/lib/tomdoc/tomdoc.rb:130:in `tomdoc'
```

You can work around by calling `.valid?` before calling it, but other method such as `raw` works fine, and the error message isn't useful anyway.

This patch fixes it by simply returning '' for `comment.tomdoc` in case of no comments.