Sha256: dc4e66117ddc096560826781d52c828b8a581f1c2beb35eac41155709e5b3f1c
Contents?: true
Size: 764 Bytes
Versions: 2
Compression:
Stored size: 764 Bytes
Contents
#### Circular Hashes This example shows hashes that make a circular reference. ```show.rb```: ```ruby require 'debug_helper' hash_0 = {} hash_1 = {} hash_0.store(:foo, hash_1) hash_1.store(:bar, hash_0) DebugHelper.show(hash_0, 'My circular hashes') ``` The output shows details of the hashes. The circular reference is not followed. ```show.yaml```: ```yaml --- Hash (size=1 message='My circular hashes'): Pair 0: Key: Symbol (size=3): to_s: foo encoding: !ruby/encoding US-ASCII Value: Hash (size=1): Pair 0: Key: Symbol (size=3): to_s: bar encoding: !ruby/encoding US-ASCII Value: Hash {:foo=>{:bar=>{...}}} ```
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
debug_helper-1.7.0 | markdown/readme/classes/hash/circular/show.md |
debug_helper-1.6.0 | markdown/readme/classes/hash/circular/show.md |