Skip to content

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

Closed
Fryguy opened this Issue Dec 15, 2011 · 4 comments

3 participants

@Fryguy
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: https://gist.github.com/1482427

@tenderlove
Owner

This is fixed in 59ecddb and e2fcf9a

@tenderlove tenderlove closed this Jan 18, 2012
@jrafanie

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

https://gist.github.com/2501904

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

@tenderlove
Owner

@jrafanie should be fixed in 620fc6d

@jrafanie

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.