Skip to content
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

Add spec for URI#parse #1022

Merged
merged 1 commit into from
May 12, 2023
Merged

Conversation

AI-Mozi
Copy link
Contributor

@AI-Mozi AI-Mozi commented May 10, 2023

#1016
Issue

URI.parse return empty string in host instead of nil. [sec-156615]

@AI-Mozi AI-Mozi marked this pull request as ready for review May 10, 2023 14:53
@andrykonchin
Copy link
Member

Looks good!

Not sure whether spec/library/uri/parser_spec.rb is a proper place. Maybe spec/ruby/library/uri/generic/ is better (for method #host).

Also there probably should be also a test case for #to_s method, similar to a check in the MRI tests:

URI("http:///foo").to_s.should == "http:///foo"

@AI-Mozi AI-Mozi force-pushed the uri_parse_spec_host branch 2 times, most recently from 426a1ff to afd0556 Compare May 12, 2023 08:54
@andrykonchin andrykonchin merged commit 9aa1cbf into ruby:master May 12, 2023
@andrykonchin
Copy link
Member

Thank you for the specs!

@andrykonchin
Copy link
Member

minor issue: Please use capitalised commit message, e.g. Add spec for URI#parse instead of add spec for URI#parse.

@AI-Mozi
Copy link
Contributor Author

AI-Mozi commented May 12, 2023

Ok, I'll remember that .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants