Clojure

clojure.set/rename-keys deletes keys when there's a collision

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Completed
  • Affects Version/s: Release 1.3
  • Fix Version/s: Release 1.5
  • Component/s: None
  • Labels:
    None
  • Patch:
    Code and Test
  • Approval:
    Ok

Description

(set/rename-keys {:a "one" :b "two" :c "three"} {:a :b :b :a}) returns {:b "one" :c "three"}
should be {:a "two" :b "one" :c "three"}

I have created a pull request for a fix, here: https://github.com/clojure/clojure/pull/23

Activity

Hide
Ed Bowler added a comment -

added fix

Show
Ed Bowler added a comment - added fix
Ed Bowler made changes -
Field Original Value New Value
Attachment rename-keys-fix.patch [ 11167 ]
Stuart Halloway made changes -
Approval Screened [ 10004 ]
Fix Version/s Release 1.5 [ 10150 ]
Rich Hickey made changes -
Approval Screened [ 10004 ] Ok [ 10007 ]
Stuart Halloway made changes -
Resolution Completed [ 1 ]
Status Open [ 1 ] Closed [ 6 ]

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: