Skip to content

Commit

Permalink
[rubygems/rubygems] Remove returning self for `Gem::PrintableUri#pars…
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-niknam authored and hsbt committed Aug 31, 2021
1 parent aa898b4 commit 4715bbf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/rubygems/printable_uri.rb
Expand Up @@ -4,7 +4,10 @@

class Gem::PrintableUri
def self.parse_uri(uri)
new(uri).parse_uri
printable_uri = new(uri)
printable_uri.parse_uri

printable_uri
end

def initialize(original_uri)
Expand All @@ -15,8 +18,6 @@ def parse_uri
@original_uri = Gem::UriParser.parse_uri(@original_uri)
@uri = @original_uri.clone
redact_credential if valid_uri?

self
end

def valid_uri?
Expand Down

0 comments on commit 4715bbf

Please sign in to comment.