Skip to content

Commit f78f075

Browse files
committed
fix file modes support check for old ruby (Tempfile.open does not return the result of block)
1 parent d87cb4a commit f78f075

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module CapabilityCheckHelpers
7878
def any_file_modes_allowed?
7979
Tempfile.open 'posix' do |f|
8080
File.chmod(0, f.path)
81-
(File.stat(f.path).mode & 0o777).zero?
81+
return (File.stat(f.path).mode & 0o777).zero?
8282
end
8383
end
8484

0 commit comments

Comments
 (0)