map 2.5.1 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/map.rb +8 -4
- data/map.gemspec +1 -1
- metadata +5 -5
data/lib/map.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class Map < Hash
|
2
|
-
Version = '2.
|
2
|
+
Version = '2.6.0' unless defined?(Version)
|
3
3
|
Load = Kernel.method(:load) unless defined?(Load)
|
4
4
|
|
5
5
|
class << Map
|
@@ -48,8 +48,8 @@ class Map < Hash
|
|
48
48
|
|
49
49
|
def coerce(other)
|
50
50
|
case other
|
51
|
-
when
|
52
|
-
|
51
|
+
when Map
|
52
|
+
other
|
53
53
|
else
|
54
54
|
allocate.update(other.to_hash)
|
55
55
|
end
|
@@ -229,7 +229,11 @@ class Map < Hash
|
|
229
229
|
|
230
230
|
def self.convert_value(value)
|
231
231
|
conversion_methods.each do |method|
|
232
|
-
return
|
232
|
+
#return convert_value(value.send(method)) if value.respond_to?(method)
|
233
|
+
if value.respond_to?(method)
|
234
|
+
value = value.send(method)
|
235
|
+
break
|
236
|
+
end
|
233
237
|
end
|
234
238
|
|
235
239
|
case value
|
data/map.gemspec
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: map
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 2.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 2.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ara T. Howard
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-16 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|