openhash 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d0640ffa1020dada980373dcacc2af5a497bdc0f5edfe997539b97ea63458a1e
4
- data.tar.gz: f7712ce1ce7b1f3b2e40cd05de0f9c23779870d38c86e4d4c0869509f9c67f38
3
+ metadata.gz: f5c30dafd59bad88a02579854f2120de84429227a4af28971ed57e011247cd8d
4
+ data.tar.gz: 48f1a789215c4869d3aabb0898f1e89078caed467fde027b25da303d69a46c51
5
5
  SHA512:
6
- metadata.gz: a231dcfa2b4fbe72ee14fc77360a51ef1c6374a57aa506d372225575f4630e1adeb37f3c4a4cd06948f340b24b4380b00d864e546956616c2aa3d100f2759c1b
7
- data.tar.gz: 505015f30608bdc215c9d253b7e91da1aa642120a6ae1a8a702cb22088ccf7f7dc4445da848810cce0c3a689ad1fd94838b79a4727682b3d014fe2619157a8a0
6
+ metadata.gz: 857cd4505010c425def7893aceaba8deb5c00ce1374d7ececd501485b4a12b73e63f6e03a57c1adada4e294df45130dd9470ed11a8320fd209dba409a92e41ef
7
+ data.tar.gz: 29c6c529385da83d5dd8c6dea6d78f8722b647d4cecc4607a9ccf7801c255d5cb758d07154cbdaec205a049b9de8605c50c436454d9c607fc8b8098cafb78271
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openhash (0.0.4)
4
+ openhash (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -11,15 +11,15 @@
11
11
 
12
12
  ### Usage ###
13
13
  ```ruby
14
- # person = OpenHash.new(name: "John Smith", hometown: { city: "London" })
15
- # person.name #=> "John Smith"
14
+ # person = OpenHash.new(name: "John", hometown: { city: "London" })
15
+ # person.name #=> "John"
16
16
  # person.hometown.city #=> "London"
17
17
  #
18
18
  # person = OpenHash.new
19
- # person.name = "Piter Lee"
20
- # person.hometown.city = "Guangzhou"
21
- # person.parents.father.name = "Heron Lee"
22
- # person #=> { name: "Piter Lee", hometown: { city: "Guangzhou" }, parents: { father: { name: "Heron Lee" } } }
19
+ # person.name = "Lion"
20
+ # person.hometown.city = "Paris"
21
+ # person.parents.father.name = "Heron"
22
+ # person #=> { name: "Lion", hometown: { city: "Paris" }, parents: { father: { name: "Heron" } } }
23
23
  ```
24
24
  ### License ###
25
25
  Released under the [MIT](http://opensource.org/licenses/MIT) license. See LICENSE file for details.
data/lib/open_hash.rb CHANGED
@@ -33,7 +33,7 @@ class OpenHash < OpenStruct
33
33
  # BlackHole Class
34
34
  class BlackHole < BasicObject
35
35
  DELEGATE_REGEX = /(.+\?)|(to_.+)|(={2,3})\z/.freeze
36
- @nil_methods = ::NilClass.instance_methods.grep(DELEGATE_REGEX)
36
+ @nil_methods = ::NilClass.instance_methods(false).grep(DELEGATE_REGEX)
37
37
 
38
38
  def initialize(ohash, *args)
39
39
  @ohash = ohash
data/openhash.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "openhash"
8
- spec.version = '0.0.4'
8
+ spec.version = '0.0.5'
9
9
  spec.authors = ["cenxky"]
10
10
  spec.email = ["cenxky@gmail.com"]
11
11
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openhash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - cenxky