Sha256: 75eb014e8e947f33c67a77d28e7cca0b848d2a6e4d34af00cdbb3975962c293e

Contents?: true

Size: 674 Bytes

Versions: 1

Compression:

Stored size: 674 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 encoding=US-ASCII): :foo
    Value:
      Hash (size=1):
        Pair 0:
          Key:
            Symbol (size=3 encoding=US-ASCII): :bar
          Value: Hash {:foo=>{:bar=>{...}}}
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
debug_helper-1.5.0 markdown/readme/classes/hash/circular/show.md