Skip to content

Commit

Permalink
add similar() method for EnvHash. fixes #4643
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Oct 26, 2013
1 parent 7173fe8 commit 763cd61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions base/env.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ end
end
const ENV = EnvHash()

similar(::EnvHash) = Dict{ByteString,ByteString}()

getindex(::EnvHash, k::String) = @accessEnv k throw(KeyError(k))
get(::EnvHash, k::String, def) = @accessEnv k (return def)
in(k::String, ::KeyIterator{EnvHash}) = _hasenv(k)
Expand Down

0 comments on commit 763cd61

Please sign in to comment.