rspec/rspec-expectations — pull request #200 by petergoldstein (2013-01-22 23:08:25+00:00)
Title: Add support for diff-lcs 1.2.x while maintaining backwards compatibility with 1.1.3

diff-lcs 1.2.0 has recently been released, and all users have been encouraged to upgrade. rspec-expectations has a gemspec which specifies ~> 1.1.3, which makes this upgrade impossible for rspec users.

There is an API incompatibility (basically a method name change) between the two diff-lcs versions that materially affects rspec-expectations, although the underlying functionality is essentially unchanged. So I added a respond_to? call to determine if the diff-lcs gem is 1.2.x or 1.1.3, and which calls the appropriate method for the library version.

This is a very limited change, although there's no easy way to test the gem's compatibility against both versions of diff-lcs as part of the specs.