diff options
author | Hiroshi SHIBATA <[email protected]> | 2023-04-05 17:06:01 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-04-05 09:50:29 +0000 |
commit | e003784fc8bfa527cf21c317741101a713c041c0 () | |
tree | 0d69690aec6d5f156ed90241d6beb46e112cc503 /lib/rubygems/commands | |
parent | 65d27d3c0a1235f04ca90f94e29a7f2ddfd1b574 (diff) |
[rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
https://.com/rubygems/rubygems/commit/9264d83421
-rw-r--r-- | lib/rubygems/commands/contents_command.rb | 4 | ||||
-rw-r--r-- | lib/rubygems/commands/setup_command.rb | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -94,7 +94,7 @@ prefix or only the files that are requireable. gem_path = spec.full_gem_path extra = "/{#{spec.require_paths.join ","}}" if options[:lib_only] glob = "#{gem_path}#{extra}/**/*" - prefix_re = /#{Regexp.escape(gem_path)}\// Dir[glob].map do |file| [gem_path, file.sub(prefix_re, "")] @@ -104,7 +104,7 @@ prefix or only the files that are requireable. def files_in_default_gem(spec) spec.files.map do |file| case file - when /\A#{spec.bindir}\// # $' is POSTMATCH [RbConfig::CONFIG["bindir"], $'] when /\.so\z/ @@ -7,8 +7,8 @@ require_relative "../command" # RubyGems checkout or tarball. class Gem::Commands::SetupCommand < Gem::Command - HISTORY_HEADER = /^#\s*[\d.a-zA-Z]+\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze - VERSION_MATCHER = /^#\s*([\d.a-zA-Z]+)\s*\/\s*\d{4}-\d{2}-\d{2}\s*$/.freeze ENV_PATHS = %w[/usr/bin/env /bin/env].freeze |