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

ruby-changes:57558

From: bronzdoc <ko1@a...>
Date: Thu, 5 Sep 2019 21:30:03 +0900 (JST)
Subject: [ruby-changes:57558] 92be07b1e1 (master): [rubygems/rubygems] Remove unnecessary gem_name method

https://git.ruby-lang.org/ruby.git/commit/?id=92be07b1e1

From 92be07b1e1a9ca3b0e2588817629c23ab1201701 Mon Sep 17 00:00:00 2001
From: bronzdoc <lsagastume1990@g...>
Date: Fri, 23 Aug 2019 15:19:54 -0600
Subject: [rubygems/rubygems] Remove unnecessary gem_name method

https://github.com/rubygems/rubygems/commit/d1bb122651

diff --git a/lib/rubygems/commands/build_command.rb b/lib/rubygems/commands/build_command.rb
index c7d5fd3..0ea5582 100644
--- a/lib/rubygems/commands/build_command.rb
+++ b/lib/rubygems/commands/build_command.rb
@@ -57,15 +57,12 @@ Gems can be saved to a specified filename with the output option: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/build_command.rb#L57
   end
 
   def execute
+    gem_name = get_one_optional_argument || find_gemspec
     build_gem(gem_name)
   end
 
   private
 
-  def gem_name
-    get_one_optional_argument || find_gemspec
-  end
-
   def find_gemspec
     gemspecs = Dir.glob("*.gemspec").sort
 
@@ -77,7 +74,7 @@ Gems can be saved to a specified filename with the output option: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/commands/build_command.rb#L74
     gemspecs.first
   end
 
-  def build_gem(gem_name = get_one_optional_argument)
+  def build_gem(gem_name)
     gemspec = File.exist?(gem_name) ? gem_name : "#{gem_name}.gemspec"
 
     if File.exist?(gemspec)
-- 
cgit v0.10.2


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

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