diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-10 11:06:15 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-27 10:10:44 +0900 |
commit | 3f3da6561bdc73714060519a5c505c6d39391851 (patch) | |
tree | c39b7d048f5d718bba268886e40cf3bae24c0405 | |
parent | 4ad0834639b054f5b7143484cf35057736d44b46 (diff) | |
download | psych-3f3da6561bdc73714060519a5c505c6d39391851.tar.gz |
Remove Psych.add_private_type
-rw-r--r-- | lib/psych/deprecated.rb | 7 | ||||
-rw-r--r-- | test/psych/test_deprecated.rb | 10 |
2 files changed, 0 insertions, 17 deletions
diff --git a/lib/psych/deprecated.rb b/lib/psych/deprecated.rb index 4e01112..bab453c 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_private_type type_tag, &block - warn "#{caller[0]}: add_private_type is deprecated, use add_domain_type" if $VERBOSE - domain = 'x-private' - key = [domain, type_tag].join ':' - @domain_types[key] = [key, block] - end - def self.tagurize thing warn "#{caller[0]}: add_private_type is deprecated, use add_domain_type" if $VERBOSE return thing unless String === thing diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index abb6cae..1cfaab4 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -122,16 +122,6 @@ module Psych assert_match(/helloworld/, Psych.dump(YamlAs.new)) 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 - def test_tagurize assert_nil Psych.tagurize nil assert_equal Psych, Psych.tagurize(Psych) |