Skip to content

Raise ArgumentError if host component is nil #1278

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

Closed
wants to merge 1 commit into from

Conversation

oss92
Copy link

@oss92 oss92 commented Feb 28, 2016

Raised ArgumentError, "no host component for URI" if uri.hostname is nil.

It used to raise TypeError: can't dup NilClass which can be pretty vague for some developers.

@oss92 oss92 force-pushed the net_http_no_host_error branch from 71a29f3 to 3b09147 Compare February 28, 2016 10:49
@matzbot matzbot closed this in 0f7b26a Mar 8, 2018
esparta added a commit to esparta/ruby that referenced this pull request Mar 9, 2018
A new exception is raised if an URI::HTTP is received and that object doesn't
have a hostname property.
Complementary to ruby#1278
k0kubun pushed a commit that referenced this pull request Aug 15, 2019
A new exception is raised if an URI::HTTP is received and that object doesn't
have a hostname property.
Complementary to #1278
hsbt pushed a commit to ruby/net-http that referenced this pull request Feb 13, 2020
From: oss92 <mohamed.o.alnagdy@gmail.com>
fix ruby/ruby#1278

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant