lib/sub_diff/collection.rb in sub_diff-1.0.1 vs lib/sub_diff/collection.rb in sub_diff-1.0.2

- old
+ new

@@ -1,9 +1,5 @@ -require 'delegate' -require 'forwardable' -require 'sub_diff/diff' - module SubDiff class Collection < SimpleDelegator extend Forwardable include Enumerable @@ -19,22 +15,10 @@ def changed? diffs.any?(&:changed?) end - def push(*args) - if args.compact.any? - diff = Diff.new(*args) - append(diff) - end - - self - end - alias_method :<<, :push - - private - - def append(diff) + def push(diff) unless diff.empty? diffs << diff __setobj__(diffs.join) end end