casted_hash 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/casted_hash.rb +3 -4
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 51538dc53f9101fbf596ee33c22b9ccdab73b1dd
4
- data.tar.gz: 07c4992f7b510b61c350d6f4a608b042edf4e28f
3
+ metadata.gz: 03378381efaa2103f51e8d24a28e45c9552a250e
4
+ data.tar.gz: 6fb6af08d855b0f90aed7d1a2bbe1f1aacf94c59
5
5
  SHA512:
6
- metadata.gz: c759b992fae0deb246f331204fcb585b79526df69fe8490b7ffb85d2bad03fa0c853062ae38263c4919a268035f06d2da8296887bbf21648b22f3d2284f0f1c0
7
- data.tar.gz: f309b99ed5fa61b30502dde40f788c4957de317948e513b56cdf3bfeb40a03ba3218c590af24e488d156ce47a477db8995799572ff34420c8757ceb80d3ab92c
6
+ metadata.gz: 7b532049f57b95324a74b5143b6250a68addd9956667b927df833ae1848650651a43e3ef72985c47064fbc9b177082792e04f9774bba85b188fc046d837a257b
7
+ data.tar.gz: 3eb0283ce3eff6fc1c09077507d5da13c40f33ea0fd416f82aa2804842120ae85b624a477fb142045329ead194df85d252725181df3fea47e8caf714232b134d
data/lib/casted_hash.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class CastedHash < Hash
2
- VERSION = "0.8.2"
2
+ VERSION = "0.8.3"
3
3
 
4
4
  def initialize(constructor = {}, cast_proc = nil)
5
5
  raise ArgumentError, "`cast_proc` required" unless cast_proc
@@ -8,9 +8,9 @@ class CastedHash < Hash
8
8
  @casting_keys = []
9
9
 
10
10
  if constructor.is_a?(CastedHash)
11
- super()
12
11
  @casted_keys = constructor.instance_variable_get(:@casted_keys).dup
13
- regular_update(constructor)
12
+ super()
13
+ update(constructor)
14
14
  elsif constructor.is_a?(Hash)
15
15
  @casted_keys = []
16
16
  super()
@@ -48,7 +48,6 @@ class CastedHash < Hash
48
48
  end
49
49
 
50
50
  alias_method :regular_writer, :[]= unless method_defined?(:regular_writer)
51
- alias_method :regular_update, :update unless method_defined?(:regular_update)
52
51
 
53
52
  def []=(key, value)
54
53
  key = convert_key(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.2
4
+ version: 0.8.3
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-05-04 00:00:00.000000000 Z
11
+ date: 2016-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler