From 20154eb0493f3cd0d4a2e0039f116c47c1252e8a Mon Sep 17 00:00:00 2001 From: Arfon Smith Date: Tue, 22 Jul 2014 16:03:10 -0500 Subject: [PATCH] Rework diff slightly --- Rakefile | 1 + lib/linguist/diff.rb | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index 964e95aa..2786e317 100644 --- a/Rakefile +++ b/Rakefile @@ -26,6 +26,7 @@ end namespace :benchmark do require 'git' require 'linguist/language' + require './lib/linguist/diff' git = Git.open('.') diff --git a/lib/linguist/diff.rb b/lib/linguist/diff.rb index 0cf75182..759fc7e7 100644 --- a/lib/linguist/diff.rb +++ b/lib/linguist/diff.rb @@ -1,4 +1,4 @@ -class Hash +module HashDiff def deep_diff(b) a = self (a.keys | b.keys).inject({}) do |diff, k| @@ -13,3 +13,7 @@ class Hash end end end + +class Hash + include HashDiff +end