lib/mutant/differ.rb in mutant-0.3.0.rc3 vs lib/mutant/differ.rb in mutant-0.3.0.rc4
- old
+ new
@@ -14,19 +14,15 @@
# otherwise
#
# @api private
#
def diff
- output = ''
case diffs.length
when 0
nil
when 1
- output =
- Diff::LCS::Hunk.new(
- old, new, diffs.first, max_length, 0
- ).diff(:unified)
- output << "\n"
+ Diff::LCS::Hunk.new(old, new, diffs.first, max_length, 0)
+ .diff(:unified) << "\n"
else
$stderr.puts(
'Mutation resulted in more than one diff, should not happen! ' +
'PLS report a bug!'
)