Tcl Library Source Code

View Ticket
Login
Ticket UUID: 3042811
Title: huddle bug in dicts with complex keys
Type: Bug Version: None
Submitter: coldstore Created on: 2010-08-11 00:00:27
Subsystem: huddle Assigned To:
Priority: 5 Medium Severity: Minor
Status: Open Last Modified: 2013-12-06 21:22:38
Resolution: None Closed By: nobody
    Closed on:
Description:
package require huddle

set bb [huddle create {a b} b c d]
puts [huddle jsondump $bb]

Run it, it produces:

key "{a b}" not known in dictionary
    while executing
"dict get $src $key"
    (procedure "::huddle::_dict_setting" line 22)
    invoked from within
"$types(callback:$tag) get_sub $src $path"
    (procedure "_get2" line 4)

I presume there's something in huddle which inappropriately deals with complex key cases.
User Comments: anonymous (claiming to be Ryan Fox) added on 2013-11-18 21:25:06:
I think this can be fixed by calling join on the key in all calls into dict within huddle. ie:

return [dict get $src [join $key]]
dict set src [join $key] $value