Skip to content

Not showing empty matched arrays and hashes in differences #1

@playupchris

Description

@playupchris

Actual behaviour:

puts DiffMatcher::difference({:a=>1,:b=>2,:c=>[]}, {:a=>2,:b=>2,:c=>[]})
{
  :a=>- 1+ 2,
  :b=>2
}
Where, - 1 missing, + 1 additional
puts DiffMatcher::difference({:a=>1,:b=>2,:c=>{}}, {:a=>2,:b=>2,:c=>{}})
{
  :a=>- 1+ 2,
  :b=>2
}
Where, - 1 missing, + 1 additional

Expected behaviour:

puts DiffMatcher::difference({:a=>1,:b=>2,:c=>[]}, {:a=>2,:b=>2,:c=>[]})
{
  :a=>- 1+ 2,
  :b=>2,
  :c=>[]
}
Where, - 1 missing, + 1 additional
puts DiffMatcher::difference({:a=>1,:b=>2,:c=>{}}, {:a=>2,:b=>2,:c=>{}})
{
  :a=>- 1+ 2,
  :b=>2,
  :c=>{}
}
Where, - 1 missing, + 1 additional

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions