diff options
-rw-r--r-- | lib/psych/deprecated.rb | 7 | ||||
-rw-r--r-- | test/psych/test_deprecated.rb | 12 |
2 files changed, 0 insertions, 19 deletions
diff --git a/lib/psych/deprecated.rb b/lib/psych/deprecated.rb index 66ae86d..4e01112 100644 --- a/lib/psych/deprecated.rb +++ b/lib/psych/deprecated.rb @@ -9,13 +9,6 @@ module Psych attr_accessor :to_yaml_style end - def self.add_ruby_type type_tag, &block - warn "#{caller[0]}: add_ruby_type is deprecated, use add_domain_type" if $VERBOSE - domain = 'ruby.yaml.org,2002' - key = ['tag', domain, type_tag].join ':' - @domain_types[key] = [key, block] - end - def self.add_private_type type_tag, &block warn "#{caller[0]}: add_private_type is deprecated, use add_domain_type" if $VERBOSE domain = 'x-private' diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index 96e794d..abb6cae 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -122,18 +122,6 @@ module Psych assert_match(/helloworld/, Psych.dump(YamlAs.new)) end - def test_ruby_type - types = [] - appender = lambda { |*args| types << args } - - Psych.add_ruby_type('foo', &appender) - Psych.load <<-eoyml -- !ruby.yaml.org,2002/foo bar - eoyml - - assert_equal [["tag:ruby.yaml.org,2002:foo", "bar"]], types - end - def test_private_type types = [] Psych.add_private_type('foo') { |*args| types << args } |