functional_hash 0.2.0 → 0.2.1

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: 4626f00abe819f9a997665541f23a1df6b84bf2c
4
- data.tar.gz: f3cc6b4b70c433a2c490c542641ddd303a3ca21b
3
+ metadata.gz: f4e9bf748d15b19c380abbba179e9a16dab17469
4
+ data.tar.gz: 9c67ac60615107e21dc97a5c7457e0a97e5fd0fe
5
5
  SHA512:
6
- metadata.gz: 516aa4a754941e1b7241379313fa4e3685d8fc5e6a50d4cc7acced2b1c5763bf4ebe57dd65c4e0315d0641f46171b4e589c267068ba6066346ee86e791633dd9
7
- data.tar.gz: 0a9b61706f365f7ca7c5fc470ea9111a3353e03eb7bf364fd442d3c746b39e4e3970ab1d85daa18502165fdcc4168711242c70152c0d0e44ef7126a8aefe8293
6
+ metadata.gz: 9867825e101289aaafd31d92fb64868813305ba4029da1c39ce9ccd99a22f0bcf3effacc8b1d8c9f29b01a131b947f37facb30eead647246487eab941239247d
7
+ data.tar.gz: b2aeb4d4b03e7b3d729deb42e1c9f1117df6b1ef04618d2d412aa2efdfebe21e2361f90e22da4cd57825196732edf1a3526084030555091cb0c9a31786800138
@@ -1,7 +1,7 @@
1
1
  class FunctionalHash < Hash
2
2
  def [](*args)
3
3
  key = args.shift
4
- if fetch(key).is_a? Proc
4
+ if fetch(key, nil).is_a? Proc
5
5
  if fetch(key).arity == 0
6
6
  fetch(key).call
7
7
  else
@@ -1,3 +1,3 @@
1
1
  class FunctionalHash < Hash
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: functional_hash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Myers