-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Added missing XML::Attributes#delete #6910
Added missing XML::Attributes#delete #6910
Conversation
"Delete" methods usually return the value that is being deleted. I think this would make sense here, too. |
17e15c8
to
2f16a68
Compare
Done, @straight-shoota! |
spec/std/xml/xml_spec.cr
Outdated
res = root.delete("bar") | ||
root["bar"]?.should be_nil | ||
root.to_s.should eq(%{<foo/>}) | ||
res.should eq "bar" |
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 meant it to return the value, in this case baz
.
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.
Right
2f16a68
to
b47e068
Compare
Fixes from PR feedback More pr fixes Be gone
b47e068
to
aaef611
Compare
🎊 🎈 |
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.
Thank you @joenas 👍
Happy to help @sdogruyol 😊 |
Hello!
This adds the missing
XML::Attributes#delete
referenced in #3902. I wasn't sure about what kind of return value that would be appropriate so I went with what felt natural.