Skip to content

Commit

Permalink
Remove returning self for Gem::PrintableUri#parse_uri
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-niknam authored and deivid-rodriguez committed Aug 24, 2021
1 parent c3bb52e commit 25c99d7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/rubygems/printable_uri.rb
Original file line number Diff line number Diff line change
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 25c99d7

Please sign in to comment.