diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-08 17:58:25 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-08 17:58:25 +0900 |
commit | d6cf4c0c997752c9e23876a8d5c205737317a6e3 (patch) | |
tree | 9d3695e57455c260e4401ea6549ff4c326614792 /tool | |
parent | b90ca734f38b54852d60f4d83afdbbad3861e557 (diff) | |
download | ruby-d6cf4c0c997752c9e23876a8d5c205737317a6e3.tar.gz |
rbinstall.rb: just call File.basename directly
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/rbinstall.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tool/rbinstall.rb b/tool/rbinstall.rb index 7f522e54d1..305287c637 100755 --- a/tool/rbinstall.rb +++ b/tool/rbinstall.rb @@ -22,7 +22,6 @@ require 'fileutils' require 'shellwords' require 'optparse' require 'optparse/shellwords' -require 'pathname' require 'rubygems' begin require "zlib" @@ -730,7 +729,7 @@ module RbInstall base = @base_dir prefix = base.sub(/lib\/.*?\z/, "") # for lib/net/net-smtp.gemspec - if m = Pathname.new(@gemspec).basename(".gemspec").to_s.match(/.*\-(.*)\z/) + if m = File.basename(@gemspec, ".gemspec").match(/.*\-(.*)\z/) base = "#{@base_dir}/#{m[1]}" unless remove_prefix(prefix, @base_dir).include?(m[1]) end end @@ -743,7 +742,7 @@ module RbInstall [File.basename(@gemspec, '.gemspec') + '.rb'] end - case Pathname.new(@gemspec).basename(".gemspec").to_s + case File.basename(@gemspec, ".gemspec") when "net-http" files << "lib/net/https.rb" when "optparse" |