instance method check_for_circular_references

Ruby on Rails 4.0.13

Since v3.0.20 Last seen in v4.0.13 Private

Available in: v3.0.20 v3.1.12 v3.2.22.5 v4.0.13

Signature

check_for_circular_references(value)

No documentation comment.

Parameters

value req
Source
# File activesupport/lib/active_support/json/encoding.rb, line 77
          def check_for_circular_references(value)
            unless @seen.add?(value.__id__)
              raise CircularReferenceError, 'object references itself'
            end
            yield
          ensure
            @seen.delete(value.__id__)
          end

Defined in activesupport/lib/active_support/json/encoding.rb line 77 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::JSON::Encoding::Encoder

Type at least 2 characters to search.

↑↓ navigate · open · esc close