diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-07 20:16:37 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-27 10:10:44 +0900 |
commit | 5703ff2ae6e2aded251b95e9a6c19a8307b1165a (patch) | |
tree | d9c1b509e635efdb90a46e4341cca28258362ce0 | |
parent | 7cd133d7a0068d084371a0e3a60852a66285d38a (diff) | |
download | psych-5703ff2ae6e2aded251b95e9a6c19a8307b1165a.tar.gz |
Removed Psyych.detect_implicit.
-rw-r--r-- | lib/psych/deprecated.rb | 8 | ||||
-rw-r--r-- | test/psych/test_deprecated.rb | 8 |
2 files changed, 0 insertions, 16 deletions
diff --git a/lib/psych/deprecated.rb b/lib/psych/deprecated.rb index 0c52566..66ae86d 100644 --- a/lib/psych/deprecated.rb +++ b/lib/psych/deprecated.rb @@ -9,14 +9,6 @@ module Psych attr_accessor :to_yaml_style end - def self.detect_implicit thing - warn "#{caller[0]}: detect_implicit is deprecated" if $VERBOSE - return '' unless String === thing - return 'null' if '' == thing - ss = ScalarScanner.new(ClassLoader.new) - ss.tokenize(thing).class.name.downcase - 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' diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index c2db0c5..96e794d 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -134,14 +134,6 @@ module Psych assert_equal [["tag:ruby.yaml.org,2002:foo", "bar"]], types end - def test_detect_implicit - assert_equal '', Psych.detect_implicit(nil) - assert_equal '', Psych.detect_implicit(Object.new) - assert_equal '', Psych.detect_implicit(1.2) - 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 } |