JuliaLang/DataStructures.jl — pull request #30 by wsliang (2014-05-08 17:50:09+00:00)
Title: Fix similar for DefaultDict

Right now, calling similar on a DefaultDict doesn't work:

julia> a = DefaultDict(0)
DefaultDict{Any,Any,Int64}()

julia> similar(a)
ERROR: no method DefaultDict{Any,Any,Int64}()

The reason for this problem is that you have to specify a default value when constructing a DefaultDict. This patch uses the same default value of the original DefaultDict for the new one.