diff --git a/lib/rubygems/package.rb b/lib/rubygems/package.rb index 10d9b85bf385..7f843f4e0a25 100644 --- a/lib/rubygems/package.rb +++ b/lib/rubygems/package.rb @@ -471,7 +471,7 @@ def install_location(filename, destination_dir) # :nodoc: destination = File.expand_path(filename, destination_dir) raise Gem::Package::PathError.new(destination, destination_dir) unless - destination.start_with? destination_dir + '/' + normalize_path(destination).start_with? normalize_path(destination_dir + '/') begin real_destination = File.expand_path(File.realpath(destination))