store-memory 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 784af34035d8ceeb3f47cb7c46bd4e49d6118dd6
4
- data.tar.gz: 8b72b6e11e43b9e7945afbf0477d8e095bad5ef7
3
+ metadata.gz: 3d5785233c1081c69b3600b1ebb28aa9859f7455
4
+ data.tar.gz: a41df1e17471ae45d8aa4416fe0245a173db3c04
5
5
  SHA512:
6
- metadata.gz: 1826e00cc6ab24ff7bbd9961f09f081e4d0e6cffa0a0cbbb4a1b486612da833fba38acd5f1473b288366356bcf4d11b16980f7aa2af41b71e6982176c9f53878
7
- data.tar.gz: bd8cfd07d881403cd635e6d10b0a39a09ebb06bdf0f5cf2003490f302f46df365c08b382801608b40683f927da081376cad1d4599517524e5bc100fcee9826f4
6
+ metadata.gz: 64cedc573fba7e7a2bb7858e08691278f75a95542c81b48aa6f1286406023678ad2e9982fc7625c0f1903474b05a8884897d11129bb6788167fde397be60be37
7
+ data.tar.gz: a1fde0a83a4a536fb0aae5649a542b4f274715c51f85a3312af85720dd40b2a57f78e14753bce2d2e21c351dbfc08edeb5641d632b623ac1c68b32b84925ca6a
@@ -85,10 +85,8 @@ class Store
85
85
  private
86
86
  def dup_obj(obj)
87
87
  case obj
88
- when Symbol
88
+ when NilClass,Symbol,Numeric,TrueClass,FalseClass
89
89
  obj
90
- when nil
91
- nil
92
90
  else
93
91
  obj.dup
94
92
  end
@@ -1,5 +1,5 @@
1
1
  class Store
2
2
  class Memory
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
@@ -38,6 +38,45 @@ describe Store::DataMapper::Memory::HashDupper do
38
38
  assert_equal :symbol1, dupped_hash['a']
39
39
  end
40
40
 
41
+ it 'can process fixnum' do
42
+ hash = {
43
+ 'a' => 32
44
+ }
45
+
46
+ dupped_hash = duplicate(hash)
47
+
48
+ assert_equal 32, dupped_hash['a']
49
+ end
50
+
51
+ it 'can process float' do
52
+ hash = {
53
+ 'a' => 1.3
54
+ }
55
+
56
+ dupped_hash = duplicate(hash)
57
+
58
+ assert_equal 1.3, dupped_hash['a']
59
+ end
60
+
61
+ it 'can process true' do
62
+ hash = {
63
+ 'a' => true
64
+ }
65
+
66
+ dupped_hash = duplicate(hash)
67
+
68
+ assert_equal true, dupped_hash['a']
69
+ end
70
+
71
+ it 'can process false' do
72
+ hash = {
73
+ 'a' => false
74
+ }
75
+
76
+ dupped_hash = duplicate(hash)
77
+
78
+ assert_equal false, dupped_hash['a']
79
+ end
41
80
 
42
81
 
43
82
  private
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: store-memory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Owiesniak
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-29 00:00:00.000000000 Z
11
+ date: 2013-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler