duckie/difflib — pull request #1 by wookenny (2014-05-20 11:50:26+00:00)
Title: Small bug in difflib.

Hi Jean-Bernard,

I found and fixed two issues in you difflib code:
- added a destr. to delete the allicated memory for 'matching_blocks_'
- clearing 'b2j_' in chain_b()

I had to change instantiation to be able to compile the code.
My observation was that some memory was lost, the destr. fixed that.
Furthermore, I changed the testcases. If you do not clear b2j_, the matches are wrong.
E.g., For "Hello Roger" and "Hello Peter" the block 'Roge' and 'eter' is found, in numbers (6 7 4).

Thanks for this great implementation, I intend to add ratio() for a similarity test.

Best,
Torsten