From 2d9c05441220ec5079925994b074380a78d50d8a Mon Sep 17 00:00:00 2001 From: tenderlove Date: Sat, 24 Apr 2010 20:35:20 +0000 Subject: * 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 --- test/psych/test_deprecated.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 -- cgit v1.2.3