Skip to content

Commit

Permalink
Add missing File#path call in tests
Browse files Browse the repository at this point in the history
Spotted this in the test output:

    TestMonitor#test_new_file_permissions_ignore_group_writable_unreadable = /usr/local/lib/ruby/3.1.0/delegate.rb:87: warning: deprecated Object#=~ is called on File; it always returns nil
    0.01 s = .
  • Loading branch information
dentarg committed Jul 17, 2022
1 parent 4aacbe2 commit dbf2284
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/rubygems/comparator/test_monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def test_new_file_permissions_ignore_group_writable_unreadable
file = Tempfile.new
begin
File.chmod(0660, file)
assert_equal ' (!) Unexpected permissions: 100660', Gem::Comparator::Monitor.new_file_permissions(file, true)
assert_equal ' (!) Unexpected permissions: 100660', Gem::Comparator::Monitor.new_file_permissions(file.path, true)
ensure
file.unlink
end
Expand Down

0 comments on commit dbf2284

Please sign in to comment.