jekyll doesn’t know what a sub category is. Are you saying that for that post there are 2 categories?
You could try to use tags - the category could be Code, the tag could be Ruby. You could also just make up your own front matter - on one of my sites I have articles, videos and downloads, so I made a custom front matter tag called Type where I can separate out by each of those without having to use category.
What are you trying to do? make a page that lists all your categories?
Here is a list of all content on one of my sites, broken down by category: