halostatue/diff-lcs — pull request #29 by kevinmook (2014-04-23 17:06:38+00:00)
Title: update Change and ContextChange's '==' methods to compare against the other object's class

This pull request updates the "==" methods in Diff::LCS::Change and Diff::LCS::ContextChange to verify the other object is of the same class.

This is probably a good practice whenever redefining ==, but I specifically needed to do this for compatibility with awesome_print. For for some reason, when printing out an object, awesome_print tries to compare the result against an object of a different type. awesome_print probably shouldn't do that, but this seemed like a good improvement anyway.

I didn't make any new tests as this seemed like a minor improvement, but I would be happy to add some if you would like.