Pattern: Use of nested File.dirname
Issue: -
This rule checks for nested File.dirname
. It replaces nested File.dirname
with the level argument introduced in Ruby 3.1.
# bad
File.dirname(File.dirname(path))
# good
File.dirname(path, 2)
Pattern: Use of nested File.dirname
Issue: -
This rule checks for nested File.dirname
. It replaces nested File.dirname
with the level argument introduced in Ruby 3.1.
# bad
File.dirname(File.dirname(path))
# good
File.dirname(path, 2)