diff --git a/src/ordered_robin_dict.jl b/src/ordered_robin_dict.jl index a1fd8b19..e8b3b032 100644 --- a/src/ordered_robin_dict.jl +++ b/src/ordered_robin_dict.jl @@ -382,7 +382,7 @@ julia> pop!(d, "e", 4) """ function Base.pop!(h::OrderedRobinDict, key, default) index = get(h.dict, key, -1) - (index > 0) ? _pop(h, index) : default + (index > 0) ? _pop!(h, index) : default end """ diff --git a/test/test_ordered_robin_dict.jl b/test/test_ordered_robin_dict.jl index 79efa657..73030430 100644 --- a/test/test_ordered_robin_dict.jl +++ b/test/test_ordered_robin_dict.jl @@ -417,6 +417,7 @@ end d = OrderedRobinDict(1=>'a', 2=>'b', 3=>'c') + @test pop!(d, 1, 'e') == 'a' @test pop!(d, 4, 'e') == 'e' end