rbs icon indicating copy to clipboard operation
rbs copied to clipboard

uri: Use `instance` instead of static type as return type

Open ThisGuyCodes opened this issue 2 years ago • 0 comments

In the three methods I've modified the return type is always an instance of the class the method is called on, however they were hardcoded to a specific class.

I ran into URI::HTTPS.Build thinking it returns a URI::HTTP, which prompted this PR, but I decided to go up the chain and saw URI::Generic did the same thing (URI::Generic returns the result of self.new, so instance is a more true-to-code return type).

ThisGuyCodes avatar Feb 07 '24 16:02 ThisGuyCodes