mojombo/jekyll — pull request #767 by parkr (2013-01-18 03:09:51+00:00)
Title: Force Categories to be Strings

This PR fixes #759, which describes an error that is produced when a category is a number (and thus read in as a `Fixnum`). The error is caused by `CGI.escape`, which calls `gsub` on the input. Unfortunately, `Fixnum#gsub` doesn't exist, and so Jekyll throws this error:

/Users/parkermoore/code/jekyll/lib/jekyll/post.rb:157:in `block in url'
/Users/parkermoore/code/jekyll/lib/jekyll/post.rb:157:in `map'
/Users/parkermoore/code/jekyll/lib/jekyll/post.rb:157:in `url'
...

This fix and accompanying test ensures that all categories being passed to `CGI.escape` are instances of `String`, and are then added to the URL properly.