From db17d694ea6849b813a09856008310168c5a04ea Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 1 Mar 2014 02:09:53 +0000 Subject: * ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding objects. * ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding objects. * test/psych/test_encoding.rb: add test * ext/psych/lib/psych.rb: add version git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_encoding.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/psych') diff --git a/test/psych/test_encoding.rb b/test/psych/test_encoding.rb index e370606c77..517cae2069 100644 --- a/test/psych/test_encoding.rb +++ b/test/psych/test_encoding.rb @@ -31,6 +31,11 @@ module Psych @emitter = Psych::Emitter.new @buffer end + def test_dump_load_encoding_object + assert_cycle Encoding::US_ASCII + assert_cycle Encoding::UTF_8 + end + def test_transcode_shiftjis str = "こんにちは!" loaded = Psych.load("--- こんにちは!".encode('SHIFT_JIS')) -- cgit v1.2.3