samg / diffy

Easy Diffing in Ruby
http://rubygems.org/gems/diffy
MIT License
1.26k stars 103 forks source link

Implemented 'empty?' method for determining whether a diff is empty #87

Closed ashleydavies closed 4 years ago

ashleydavies commented 7 years ago

When using this I thought it would be useful to check if a diff is empty for conditional behaviour.

I'm not hugely happy with the logic in empty? - in particular it feels a bit unpleasant to conditionally call diff, but it seems like the simplest way of implementing this functionality without some overhaul to break up the diff method.

Hope this is useful; let me know if you'd like any changes.

tomasc commented 6 years ago

@samg @ashleydavies thank you, this would be nice to have merged in!