Index: lib/pathname.rb =================================================================== --- lib/pathname.rb (revision 20106) +++ lib/pathname.rb (working copy) @@ -233,6 +233,10 @@ @path.tr('/', "\0") <=> other.to_s.tr('/', "\0") end + def =~(pattern) + to_s =~ pattern + end + def hash # :nodoc: @path.hash end