Closed gmcgibbon closed 4 weeks ago
Looks like <=>
doesn't behave the way I thought it did.
Pathname.include Comparable
Pathname("/a/b") <= Pathname("/a/b/c") # is true, but
Pathname("/a/b") <= Pathname("/a/c") # is also true
Closing. Thanks for the feedback on the issue! ❤️
I think Pathname should still implement Comparable when defining the <=>
method
Fixes 20676
I tried comparing pathnames to see if one was a subdirectory of another, and noticed it implements
<=>
but doesn't includeComparable
. This allows pathnames respond to comparison operators and methods like their backing strings do.