From d07d45767748539084f20cbb921b9e6dc00d46dc Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Fri, 13 May 2011 12:41:38 -0500 Subject: [PATCH] Add Pathname#== --- lib/linguist/pathname.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/linguist/pathname.rb b/lib/linguist/pathname.rb index 71abb826..0ea04b67 100644 --- a/lib/linguist/pathname.rb +++ b/lib/linguist/pathname.rb @@ -40,5 +40,10 @@ module Linguist def to_s @path.dup end + + def eql?(other) + other.is_a?(self.class) && @path == other.to_s + end + alias_method :==, :eql? end end