diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-01 02:09:53 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-03-01 02:09:53 +0000 |
commit | db17d694ea6849b813a09856008310168c5a04ea (patch) | |
tree | d625d6f4e62620cad9bb14492bb3bf1755878820 /test | |
parent | 1964c2b14ab8e0ba7c0bce5cb6313414e0a8903d (diff) | |
download | ruby-db17d694ea6849b813a09856008310168c5a04ea.tar.gz |
* 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
Diffstat (limited to 'test')
-rw-r--r-- | test/psych/test_encoding.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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')) |