emailvision 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/emailvision/tools.rb +12 -8
  2. metadata +2 -2
@@ -55,16 +55,20 @@ module Emailvision
55
55
  return enum_for(:dfs, hash) unless block
56
56
 
57
57
  result = {}
58
- hash.map do |k,v|
59
- result[k] = if v.is_a? Array
60
- v.map do |elm|
61
- r_each(elm, &block)
58
+ if hash.is_a?(Hash)
59
+ hash.map do |k,v|
60
+ result[k] = if v.is_a? Array
61
+ v.map do |elm|
62
+ r_each(elm, &block)
63
+ end
64
+ elsif v.is_a? Hash
65
+ r_each(v, &block)
66
+ else
67
+ yield(v)
62
68
  end
63
- elsif v.is_a? Hash
64
- r_each(v, &block)
65
- else
66
- yield(v)
67
69
  end
70
+ else
71
+ result = yield(hash)
68
72
  end
69
73
 
70
74
  result
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emailvision
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-26 00:00:00.000000000 Z
12
+ date: 2012-09-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty