From 0b396d588060707e227f21b80e964180674c8a50 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 14 Jul 2017 06:15:58 +0000 Subject: Merge psych-3.0.0.beta3 from ruby/psych. * Rely on encoding tags to determine if string should be dumped as binary. https://github.com/ruby/psych/commit/8949a47b8cee31e03e21608406ba116adcf74054 * Specify "frozen_string_literal: true". * Support to binary release for mingw32 platform. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59327 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_array.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'test/psych/test_array.rb') 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" -- cgit v1.2.3