map 1.2.3 → 1.2.5

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/map.rb +4 -6
  2. metadata +3 -3
data/lib/map.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Map < Hash
2
- Version = '1.2.3' unless defined?(Version)
2
+ Version = '1.2.5' unless defined?(Version)
3
3
  Load = Kernel.method(:load) unless defined?(Load)
4
4
 
5
5
  class << Map
@@ -97,20 +97,18 @@ class Map < Hash
97
97
  end
98
98
 
99
99
  def initialize_from_hash(hash)
100
+ map = self
100
101
  map.update(hash)
101
102
  map.default = hash.default
102
103
  end
103
104
 
104
105
  def initialize_from_array(array)
106
+ map = self
105
107
  Map.each_pair(array){|key, val| map[key] = val}
106
108
  end
107
109
 
108
110
  # support methods
109
111
  #
110
- def map
111
- self
112
- end
113
-
114
112
  def klass
115
113
  self.class
116
114
  end
@@ -274,7 +272,7 @@ class Map < Hash
274
272
  to_delete = []
275
273
  keys.each{|key| to_delete.push(key) if yield(key)}
276
274
  to_delete.each{|key| delete(key)}
277
- map
275
+ self
278
276
  end
279
277
 
280
278
  def replace(hash)
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: 25
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 3
10
- version: 1.2.3
9
+ - 5
10
+ version: 1.2.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ara T. Howard