casted_hash 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/casted_hash.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e0fdde9d0be05ae67fc01e13efb414a6391f440
|
4
|
+
data.tar.gz: 05fd32baa77c4e96a67a6b09b2b0bf5eb3d20e64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5a65a41fdb982bc127128715d6e4a3fa8ce2de31069d230a5fc5f61bf7165da5c9da46691c2d7f4697c49014e98c2944fd4432cca7010ab6f23110179008570
|
7
|
+
data.tar.gz: 7ca40f81878b5399d013e9f4f0d75d3424a56eb499c745eeacc9888bfc8e13b9a325d33287ec100394061c4ed565b5ab52fa56a0e68c83e754f22158fcad8460
|
data/lib/casted_hash.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class CastedHash < Hash
|
2
|
-
VERSION = "0.8.
|
2
|
+
VERSION = "0.8.4"
|
3
3
|
|
4
4
|
def initialize(constructor = {}, cast_proc = nil)
|
5
5
|
raise ArgumentError, "`cast_proc` required" unless cast_proc
|
@@ -94,7 +94,11 @@ class CastedHash < Hash
|
|
94
94
|
end
|
95
95
|
|
96
96
|
def dup
|
97
|
-
|
97
|
+
duplicate = super
|
98
|
+
instance_variables.each do |instance_variable|
|
99
|
+
duplicate.instance_variable_set(instance_variable, instance_variable_get(instance_variable).dup)
|
100
|
+
end
|
101
|
+
duplicate
|
98
102
|
end
|
99
103
|
|
100
104
|
def delete(key)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casted_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephan Kaag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|