lib/core/hash.rb
def diff(other, *hsh)
    o = {}
    keys.map do |k|
      if hsh.include?(k) || hsh.empty?
        other[k] == self[k] ? nil : o.merge!({k => other[k]})
      end
    end.reject {|b| b.nil? }
    o
  end
# Computes the difference between two hashes
Computes the difference between two hashes
Computes the difference between two hashes
def diff(other, *hsh)
    o = {}
    keys.map do |k|
      if hsh.include?(k) || hsh.empty?
        other[k] == self[k] ? nil : o.merge!({k => other[k]})
      end
    end.reject {|b| b.nil? }
    o
  end
def diff ( other , * hsh ) o = { } keys . map do | k | if hsh . include? ( k ) || hsh . empty? other [ k ] == self [ k ] ? nil : o . merge! ( { k => other [ k ] } ) end end . reject { | b | b . nil? } o end
Computes the difference between two hashes
Computes the difference between two hashes
other
hsh