map 6.1.0 → 6.2.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.
Files changed (4) hide show
  1. data/lib/map.rb +2 -2
  2. data/map.gemspec +1 -1
  3. data/test/map_test.rb +8 -0
  4. metadata +3 -3
data/lib/map.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  class Map < Hash
3
- Version = '6.1.0' unless defined?(Version)
3
+ Version = '6.2.0' unless defined?(Version)
4
4
  Load = Kernel.method(:load) unless defined?(Load)
5
5
 
6
6
  class << Map
@@ -262,7 +262,7 @@ class Map < Hash
262
262
  when Hash
263
263
  coerce(value)
264
264
  when Array
265
- value.map{|v| convert_value(v)}
265
+ value.map!{|v| convert_value(v)}
266
266
  else
267
267
  value
268
268
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "map"
6
- spec.version = "6.1.0"
6
+ spec.version = "6.2.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "map"
9
9
  spec.description = "description: map kicks the ass"
@@ -727,6 +727,14 @@ Testing Map do
727
727
  end
728
728
  end
729
729
 
730
+ testing 'that Array-y values preserve their class' do
731
+ map = Map.new
732
+ list = Class.new(Array){}.new
733
+ map.list = list
734
+ assert{ map.list.class == list.class }
735
+ assert{ map.list.class != Array }
736
+ end
737
+
730
738
  protected
731
739
  def new_int_map(n = 1024)
732
740
  map = assert{ Map.new }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: map
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.0
4
+ version: 6.2.0
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: 2012-06-27 00:00:00.000000000 Z
12
+ date: 2012-06-30 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: ! 'description: map kicks the ass'
15
15
  email: ara.t.howard@gmail.com
@@ -48,7 +48,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  version: '0'
49
49
  requirements: []
50
50
  rubyforge_project: codeforpeople
51
- rubygems_version: 1.8.23
51
+ rubygems_version: 1.8.24
52
52
  signing_key:
53
53
  specification_version: 3
54
54
  summary: map