Skip to content

Getting (+-) instead of diff (tilde) when comparing arrays #81

@stripedpumpkin

Description

@stripedpumpkin

Hello. I find the following behavior (using Hashdiff 1.0.1) somewhat unexpected:

Hashdiff.diff(%w[a b c], %w[a b d])
=> [["-", "[2]", "c"], ["+", "[2]", "d"]]

Would not it be better to get

Hashdiff.diff(%w[a b c], %w[a b d])
=> [["~", "[2]", "c", "d"]]

?

Is there an option to get this behavior ?

Thanks for reading!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions