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