Permalink
Browse files

Revert "force diff-lcs 122 and remove workaround"

This reverts commit f2b15a3.
  • Loading branch information...
1 parent 11cc974 commit e6c6a44125849c83e10dfc9c06cf45df5553512d @JonRowe committed Apr 11, 2013
Showing with 8 additions and 2 deletions.
  1. +7 −1 lib/rspec/expectations/differ.rb
  2. +1 −1 rspec-expectations.gemspec
@@ -28,7 +28,13 @@ def diff_as_string(input_data_new, input_data_old)
# diff includes lines of context. Otherwise, we might print
# redundant lines.
if (context_lines > 0) and hunk.overlaps?(oldhunk)
- hunk.merge(oldhunk)
+ if hunk.respond_to?(:merge)
+ # diff-lcs 1.2.x
+ hunk.merge(oldhunk)
+ else
+ # diff-lcs 1.1.3
+ hunk.unshift(oldhunk)
+ end
else
output << matching_encoding(oldhunk.diff(format).to_s, output)
end
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"
- s.add_runtime_dependency 'diff-lcs', '>= 1.2.2', '< 2.0'
+ s.add_runtime_dependency 'diff-lcs', '>= 1.1.3', '< 2.0'
s.add_development_dependency 'rake', '~> 10.0.0'
s.add_development_dependency 'cucumber', '~> 1.1.9'

0 comments on commit e6c6a44

Please sign in to comment.