Module: Psych

Defined in:
lib/RGSS/psych_mods.rb

Overview

Psych bugs:

1) Psych has a bug where it stores an anchor to the YAML for an object, but indexes the reference by object_id. This doesn’t keep the object alive, so if it gets garbage collected, Ruby might generate an object with the same object_id and try to generate a reference to the stored anchor. This monkey-patches the Registrar to keep the object alive so incorrect references aren’t generated. The bug is also present in Psych 1.3.4 but there isn’t a convenient way to patch that.

2) Psych also doesn’t create references and anchors for classes that implement encode_with. This modifies dump_coder to handle that situation.

Added two options: :sort - sort hashes and instance variables for objects :flow_classes - array of class types that will automatically emit with flow style

rather than block style

Defined Under Namespace

Modules: Visitors