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.
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.