Skip to content

psych doesn't handle subclasses of String nor Array #44

Fryguy opened this Issue Dec 15, 2011 · 4 comments

3 participants

Fryguy commented Dec 15, 2011

Hash is already handled, but String and Array are not (and perhaps other classes that map to YAML core types). In my system I have subclasses for Hash, String, and Array, so those are the ones I've played with so far.

The two tests below each mirror the ones that are in test_hash.rb. They can probably be copied to all of the other test files, or perhaps made into a mixin for all of the tests.

Failing test_string.rb and test_array.rb patch:


This is fixed in 59ecddb and e2fcf9a

@tenderlove tenderlove closed this Jan 18, 2012

@tenderlove It seems that this patch broke Strings that have actual values. Note that Array works as expected. See the following gist:

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.3.0]


@jrafanie should be fixed in 620fc6d


Awesome! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.