diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2017-06-29 15:09:48 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2017-06-29 15:09:48 -0700 |
commit | 0ca2d343735444d83a0dd733b52b2893c5084546 (patch) | |
tree | 30d339bd77947bc9454b67103aaafbd2ec35b537 /test | |
parent | 8949a47b8cee31e03e21608406ba116adcf74054 (diff) | |
download | psych-0ca2d343735444d83a0dd733b52b2893c5084546.zip |
Support enumerator objects
Fixes #277
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_array.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_array.rb b/test/psych/test_array.rb index 6306a04..dccbe24 100644 --- a/test/psych/test_array.rb +++ b/test/psych/test_array.rb @@ -15,6 +15,12 @@ module Psych @list = [{ :a => 'b' }, 'foo'] end + def test_enumerator + x = [1, 2, 3, 4] + y = Psych.load Psych.dump x.to_enum + assert_equal x, y + end + def test_another_subclass_with_attributes y = Y.new.tap {|o| o.val = 1} y << "foo" << "bar" |