Skip to content

Commit

Permalink
[ruby/rubygems] Remove redundant File.expand_path
Browse files Browse the repository at this point in the history
`File.realpath` already expands paths.

rubygems/rubygems@25524ebbeb
  • Loading branch information
deivid-rodriguez authored and matzbot committed Oct 10, 2021
1 parent 05e3d7b commit 6c87873
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rubygems/package.rb
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ def install_location(filename, destination_dir) # :nodoc:
raise Gem::Package::PathError.new(filename, destination_dir) if
filename.start_with? '/'

destination_dir = File.expand_path(File.realpath(destination_dir))
destination_dir = File.realpath(destination_dir)
destination = File.expand_path(filename, destination_dir)

raise Gem::Package::PathError.new(destination, destination_dir) unless
Expand Down

0 comments on commit 6c87873

Please sign in to comment.