summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/contents_command.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2023-04-05 17:06:01 +0900
committergit <[email protected]>2023-04-05 09:50:29 +0000
commite003784fc8bfa527cf21c317741101a713c041c0 ()
tree0d69690aec6d5f156ed90241d6beb46e112cc503 /lib/rubygems/commands/contents_command.rb
parent65d27d3c0a1235f04ca90f94e29a7f2ddfd1b574 (diff)
[rubygems/rubygems] util/rubocop -A --only Style/RegexpLiteral
https://.com/rubygems/rubygems/commit/9264d83421
-rw-r--r--lib/rubygems/commands/contents_command.rb4
1 files changed, 2 insertions, 2 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/