diff options
author | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-24 20:35:20 +0000 |
---|---|---|
committer | tenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-24 20:35:20 +0000 |
commit | 2d9c05441220ec5079925994b074380a78d50d8a (patch) | |
tree | ea7ef8ea7867ddbdfec787eba8a5c00e42ae3bf3 /test/psych | |
parent | d69c502c9f855a0215319516c4b0f594b4eb0606 (diff) | |
download | ruby-2d9c05441220ec5079925994b074380a78d50d8a.tar.gz |
* ext/psych/lib/psych/deprecated.rb: adding support for deprecated
"add_private_type" function
* ext/psych/lib/psych.rb: ditto
* ext/psych/lib/psych/visitors/to_ruby.rb: ditto
* test/psych/test_deprecated.rb: ditto
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych')
-rw-r--r-- | test/psych/test_deprecated.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index f5ff79b56d..c2c8a972c3 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -171,5 +171,15 @@ module Psych assert_equal 'null', Psych.detect_implicit('') assert_equal 'string', Psych.detect_implicit('foo') end + + def test_private_type + types = [] + Psych.add_private_type('foo') { |*args| types << args } + Psych.load <<-eoyml +- !x-private:foo bar + eoyml + + assert_equal [["x-private:foo", "bar"]], types + end end end |