Depends on the included_pattern's value, Dir.glob may return relative paths as its default base is the current working directory. For example, if the included_pattern is **/*.rb, the Dir.glob will return relative paths like lib/foo.rb instead of the full path like /path/to/project/lib/foo.rb.
Fixes #1971
Implementation
This commit ensures that the full paths are always expanded by using File.expand_path on the paths returned by Dir.glob.
Motivation
Depends on the
included_pattern
's value,Dir.glob
may return relative paths as its default base is the current working directory. For example, if theincluded_pattern
is**/*.rb
, theDir.glob
will return relative paths likelib/foo.rb
instead of the full path like/path/to/project/lib/foo.rb
.Fixes #1971
Implementation
This commit ensures that the full paths are always expanded by using
File.expand_path
on the paths returned byDir.glob
.Automated Tests
Manual Tests