diff options
Diffstat (limited to 'test/psych/test_array.rb')
-rw-r--r-- | test/psych/test_array.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/psych/test_array.rb b/test/psych/test_array.rb index 6306a049fc..f2bbdcab88 100644 --- a/test/psych/test_array.rb +++ b/test/psych/test_array.rb @@ -1,4 +1,4 @@ -# frozen_string_literal: false +# frozen_string_literal: true require_relative 'helper' module Psych @@ -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" |