diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-11-11 15:03:57 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-11-11 16:59:49 +0900 |
commit | 7d463e360b9c4718b17378eb52783116a01b884b (patch) | |
tree | ee6951d298d76fcbf0c5e062712e54de56a3fa39 /lib/rubygems/basic_specification.rb | |
parent | 31416423809f64d4b5ea6b9651cced3179cc5ced (diff) | |
download | ruby-7d463e360b9c4718b17378eb52783116a01b884b.tar.gz |
Merge RubyGems 3.1.0.pre3
* Fix gem pristine not accounting for user installed gems. Pull request
#2914 by Luis Sagastume.
* Refactor keyword argument test for Ruby 2.7. Pull request #2947 by
SHIBATA Hiroshi.
* Fix errors at frozen Gem::Version. Pull request #2949 by Nobuyoshi
Nakada.
* Remove taint usage on Ruby 2.7+. Pull request #2951 by Jeremy Evans.
* Check Manifest.txt is up to date. Pull request #2953 by David Rodríguez.
* Clarify symlink conditionals in tests. Pull request #2962 by David
Rodríguez.
* Update command line parsing to work under ps. Pull request #2966 by
David Rodríguez.
* Properly test `Gem::Specifications.stub_for`. Pull request #2970 by
David Rodríguez.
* Fix Gem::LOADED_SPECS_MUTEX handling for recursive locking. Pull request
#2985 by MSP-Greg.
Diffstat (limited to 'lib/rubygems/basic_specification.rb')
-rw-r--r-- | lib/rubygems/basic_specification.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/rubygems/basic_specification.rb b/lib/rubygems/basic_specification.rb index 347f8c3318..c6d63ac473 100644 --- a/lib/rubygems/basic_specification.rb +++ b/lib/rubygems/basic_specification.rb @@ -98,7 +98,7 @@ class Gem::BasicSpecification # Returns full path to the directory where gem's extensions are installed. def extension_dir - @extension_dir ||= File.expand_path(File.join(extensions_dir, full_name)).untaint + @extension_dir ||= File.expand_path(File.join(extensions_dir, full_name)).tap(&Gem::UNTAINT) end ## @@ -113,7 +113,7 @@ class Gem::BasicSpecification def find_full_gem_path # :nodoc: # TODO: also, shouldn't it default to full_name if it hasn't been written? path = File.expand_path File.join(gems_dir, full_name) - path.untaint + path.tap(&Gem::UNTAINT) path end @@ -135,9 +135,9 @@ class Gem::BasicSpecification def full_name if platform == Gem::Platform::RUBY or platform.nil? - "#{name}-#{version}".dup.untaint + "#{name}-#{version}".dup.tap(&Gem::UNTAINT) else - "#{name}-#{version}-#{platform}".dup.untaint + "#{name}-#{version}-#{platform}".dup.tap(&Gem::UNTAINT) end end @@ -149,7 +149,7 @@ class Gem::BasicSpecification @full_require_paths ||= begin full_paths = raw_require_paths.map do |path| - File.join full_gem_path, path.untaint + File.join full_gem_path, path.tap(&Gem::UNTAINT) end full_paths << extension_dir if have_extensions? @@ -163,7 +163,7 @@ class Gem::BasicSpecification def datadir # TODO: drop the extra ", gem_name" which is uselessly redundant - File.expand_path(File.join(gems_dir, full_name, "data", name)).untaint + File.expand_path(File.join(gems_dir, full_name, "data", name)).tap(&Gem::UNTAINT) end ## @@ -277,7 +277,7 @@ class Gem::BasicSpecification # TODO: do we need these?? Kill it glob = File.join(self.lib_dirs_glob, glob) - Dir[glob].map { |f| f.untaint } # FIX our tests are broken, run w/ SAFE=1 + Dir[glob].map { |f| f.tap(&Gem::UNTAINT) } # FIX our tests are broken, run w/ SAFE=1 end ## @@ -295,7 +295,7 @@ class Gem::BasicSpecification "lib" # default value for require_paths for bundler/inline end - "#{self.full_gem_path}/#{dirs}".dup.untaint + "#{self.full_gem_path}/#{dirs}".dup.tap(&Gem::UNTAINT) end ## @@ -328,7 +328,7 @@ class Gem::BasicSpecification def have_file?(file, suffixes) return true if raw_require_paths.any? do |path| - base = File.join(gems_dir, full_name, path.untaint, file).untaint + base = File.join(gems_dir, full_name, path.tap(&Gem::UNTAINT), file).tap(&Gem::UNTAINT) suffixes.any? { |suf| File.file? base + suf } end |