Skip to content

Patch problem whit symbol as key #25

@gmgp

Description

@gmgp

From Readme

require 'hashdiff'          #=> true
a = {a: 3}                  #=> {:a=>3}
b = {a: {a1: 1, a2: 2}}     #=> {:a=>{:a1=>1, :a2=>2}}
diff = HashDiff.diff(a, b)  #=> [["~", "a", 3, {:a1=>1, :a2=>2}]]

HashDiff.patch!(a, diff)   #=> {:a=>3, "a"=>{:a1=>1, :a2=>2}}

rspec files check only string keys

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