summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2024-09-20 13:13:02 +0200
committergit <svn-admin@ruby-lang.org>2024-09-20 15:57:39 +0000
commitc30297b3d19283ec27b1d0248bed9fca6092038b (patch)
tree93cd369c0f29f7d01ec13e2cdcd8ab17d85c3644 /spec
parent42a6916a3c120afcce76910059e09408ace3c24b (diff)
[rubygems/rubygems] Fix RubyGems warnings about incorrect executable permissions
https://github.com/rubygems/rubygems/commit/92dcf60fc1
Diffstat (limited to 'spec')
-rw-r--r--spec/bundler/support/builders.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/bundler/support/builders.rb b/spec/bundler/support/builders.rb
index b493ab8d60..18cd6fe1ef 100644
--- a/spec/bundler/support/builders.rb
+++ b/spec/bundler/support/builders.rb
@@ -538,10 +538,10 @@ module Spec
end
@files.each do |file, source|
- file = Pathname.new(path).join(file)
- FileUtils.mkdir_p(file.dirname)
- File.open(file, "w") {|f| f.puts source }
- File.chmod("+x", file) if @spec.executables.map {|exe| "#{@spec.bindir}/#{exe}" }.include?(file)
+ full_path = Pathname.new(path).join(file)
+ FileUtils.mkdir_p(full_path.dirname)
+ File.open(full_path, "w") {|f| f.puts source }
+ FileUtils.chmod("+x", full_path) if @spec.executables.map {|exe| "#{@spec.bindir}/#{exe}" }.include?(file)
end
path
end