Sha256: b436af44315852190004f312596cada47bf2d495f2ce55b0f5c5a81a27141ffa

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 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 name='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.0.0 markdown/readme/classes/hash/circular/show.md