mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 09:40:21 +00:00
Rework diff slightly
This commit is contained in:
1
Rakefile
1
Rakefile
@@ -26,6 +26,7 @@ end
|
|||||||
namespace :benchmark do
|
namespace :benchmark do
|
||||||
require 'git'
|
require 'git'
|
||||||
require 'linguist/language'
|
require 'linguist/language'
|
||||||
|
require './lib/linguist/diff'
|
||||||
|
|
||||||
git = Git.open('.')
|
git = Git.open('.')
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
class Hash
|
module HashDiff
|
||||||
def deep_diff(b)
|
def deep_diff(b)
|
||||||
a = self
|
a = self
|
||||||
(a.keys | b.keys).inject({}) do |diff, k|
|
(a.keys | b.keys).inject({}) do |diff, k|
|
||||||
@@ -13,3 +13,7 @@ class Hash
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class Hash
|
||||||
|
include HashDiff
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user