-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #17956 and add tests #18012
Fix #17956 and add tests #18012
Conversation
io = IOBuffer() | ||
show(io, ENV) | ||
s = takebuf_string(io) | ||
@test contains(s, k1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we be even more specific and check for "$k1 => $k1"
(maybe with some whitespace padding as needed)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have updated it to:
@test contains(s, "$k1=$k1")
@test contains(s, "$k2=$k2")
…d no other associative type implement the method.
Thank you! Good catch. Off-by-one errors are annoying. |
This fixes #17956 and add tests for the bug. The bug was introduced in 103db50 cc: @StefanKarpinski
PR commits changes:
env.jl
test to it own file intest
delete!(ENV, k ,def)
as it is inherently type unstable and no other associative type implement the method.withenv
inlineThe deprecation of
delete!(ENV, k ,def)
should not be backported, but the rest of the commits should.