Actions
Feature #20676
closedPathnames aren't Comparable
    Feature #20676:
    Pathnames aren't Comparable
  
Status:
Feedback
Assignee:
-
Target version:
-
Description
👋
I was working with Pathnames recently and noticed that I could do:
Pathname("/a/b").to_s <= Pathname("/a/b/c").to_s
but could not do:
Pathname("/a/b") <= Pathname("/a/b/c")
to check if pathnames are subdirectories of each other.
Pathname implements <=> with case insensitive matching for use-cases like this, but does not include Comparable. I think Pathname should include Comparable. I've opened a PR here for your consideration.
Thanks!
Actions