zolrath/marky_markov — pull request #1 by yujiyokoo (2012-05-10 09:53:25+00:00)
Title: Fixed an issue with depth 1 which raised array negative index.

Hello. I have identified and fixed an issue with marky_markov.

In MarkovSentenceGenerator#generate, if you have key depth 1, when punctuation is encountered, you add the punctuation to the last word. This adds no new word, so it makes your word count short by 1. This results in array negative index at line 91.

You should be able to see this happen if you run spec without the fix in the generator.

Cheers,
Yuji Yokoo