Comparing file paths as strings may not work well for some reasons, symlink, relative __FILE__, etc.
Some alternatives are possible: comparing with File.realpath, or with File.identical?, it should be most robust to escape the target string contained within this file itself.
Escape the target string to be checked
Comparing file paths as strings may not work well for some reasons,
symlink, relative
__FILE__, etc.Some alternatives are possible: comparing with
File.realpath, orwith
File.identical?, it should be most robust to escape the targetstring contained within this file itself.