* ext/psych/lib/psych/deprecated.rb: adding deprecated "read_type_class"

method
* test/psych/test_deprecated.rb: ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
tenderlove 2010-04-27 20:19:16 +00:00
parent 4d4038f575
commit ad3c1061a7
2 changed files with 22 additions and 0 deletions

View file

@ -187,5 +187,17 @@ module Psych
assert_equal Psych, Psych.tagurize(Psych)
assert_equal 'tag:yaml.org,2002:foo', Psych.tagurize('foo')
end
def test_read_type_class
things = Psych.read_type_class 'tag:yaml.org,2002:int:Psych::TestDeprecated::QuickEmitter', Object
assert_equal 'int', things.first
assert_equal Psych::TestDeprecated::QuickEmitter, things.last
end
def test_read_type_class_no_class
things = Psych.read_type_class 'tag:yaml.org,2002:int', Object
assert_equal 'int', things.first
assert_equal Object, things.last
end
end
end