Added missing XML::Attributes#delete#6910
Merged
sdogruyol merged 1 commit intocrystal-lang:masterfrom Oct 6, 2018
Merged
Conversation
Member
|
"Delete" methods usually return the value that is being deleted. I think this would make sense here, too. |
17e15c8 to
2f16a68
Compare
Contributor
Author
|
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" |
Member
There was a problem hiding this comment.
I meant it to return the value, in this case baz.
2f16a68 to
b47e068
Compare
Fixes from PR feedback More pr fixes Be gone
b47e068 to
aaef611
Compare
bcardiff
approved these changes
Oct 4, 2018
straight-shoota
approved these changes
Oct 4, 2018
Contributor
Author
|
🎊 🎈 |
sdogruyol
approved these changes
Oct 5, 2018
Contributor
Author
|
Happy to help @sdogruyol 😊 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello!
This adds the missing
XML::Attributes#deletereferenced in #3902. I wasn't sure about what kind of return value that would be appropriate so I went with what felt natural.