[前][次][番号順一覧][スレッド一覧]

ruby-changes:67492

From: Daniel <ko1@a...>
Date: Tue, 31 Aug 2021 19:08:13 +0900 (JST)
Subject: [ruby-changes:67492] 4715bbf7b3 (master): [rubygems/rubygems] Remove returning self for `Gem::PrintableUri#parse_uri`

https://git.ruby-lang.org/ruby.git/commit/?id=4715bbf7b3

From 4715bbf7b3ab2fdc34f37a84cf004722d8ef7172 Mon Sep 17 00:00:00 2001
From: Daniel Niknam <mhmd.niknam@g...>
Date: Tue, 24 Aug 2021 00:53:46 +1000
Subject: [rubygems/rubygems] Remove returning self for
 `Gem::PrintableUri#parse_uri`

https://github.com/rubygems/rubygems/commit/25c99d7f9d
---
 lib/rubygems/printable_uri.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/rubygems/printable_uri.rb b/lib/rubygems/printable_uri.rb
index f719f4d..4758779 100644
--- a/lib/rubygems/printable_uri.rb
+++ b/lib/rubygems/printable_uri.rb
@@ -4,7 +4,10 @@ require_relative 'uri_parser' https://github.com/ruby/ruby/blob/trunk/lib/rubygems/printable_uri.rb#L4
 
 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)
@@ -15,8 +18,6 @@ class Gem::PrintableUri https://github.com/ruby/ruby/blob/trunk/lib/rubygems/printable_uri.rb#L18
     @original_uri = Gem::UriParser.parse_uri(@original_uri)
     @uri = @original_uri.clone
     redact_credential if valid_uri?
-
-    self
   end
 
   def valid_uri?
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]