hashr 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,11 +18,8 @@ class Hash
18
18
  end unless Hash.method_defined?(:deep_symbolize_keys)
19
19
 
20
20
  # deep_merge_hash! by Stefan Rusterholz, see http://www.ruby-forum.com/topic/142809
21
- MERGER = proc do |key, v1, v2|
22
- Hash === v1 && Hash === v2 ? v1.merge(v2, &MERGER) : v2
23
- end
24
-
25
21
  def deep_merge(other)
26
- merge(other, &MERGER)
22
+ merger = proc { |key, v1, v2| Hash === v1 && Hash === v2 ? v1.merge(v2, &merger) : v2 }
23
+ merge(other, &merger)
27
24
  end unless Hash.method_defined?(:deep_merge)
28
25
  end
@@ -1,3 +1,3 @@
1
1
  class Hashr < Hash
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hashr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sven Fuchs