diff --git a/test/psych/test_string.rb b/test/psych/test_string.rb index 01fc0e4b..31ff0b81 100644 --- a/test/psych/test_string.rb +++ b/test/psych/test_string.rb @@ -85,9 +85,11 @@ def test_empty_character_subclass end def test_subclass_with_attributes - y = Psych.load Psych.dump Y.new.tap {|y| y.val = 1} - assert_equal Y, y.class - assert_equal 1, y.val + y = Y.new.tap {|y| y.val = 1} + desarialized_y = Psych.load Psych.dump y + assert_equal Y, desarialized_y.class + assert_equal 1, desarialized_y.val + assert_equal desarialized_y.encoding, y.encoding end def test_string_with_base_60