diff options
author | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-27 10:20:18 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2017-03-27 10:20:18 +0900 |
commit | 712a65a53f3c15105cd86e8ad3ee3c779050ada4 (patch) | |
tree | f1b75eb078ec8c05443b327b97ef2d3d1fc1f573 | |
parent | 5e0c3160ea0412b866e1e949890eb02e9c4c186c (diff) | |
download | psych-712a65a53f3c15105cd86e8ad3ee3c779050ada4.tar.gz |
Fixed gabage linesremove-deprecated-methods
-rw-r--r-- | lib/psych/core_ext.rb | 13 | ||||
-rw-r--r-- | lib/psych/visitors/yaml_tree.rb | 21 | ||||
-rw-r--r-- | test/psych/test_deprecated.rb | 13 |
3 files changed, 0 insertions, 47 deletions
diff --git a/lib/psych/core_ext.rb b/lib/psych/core_ext.rb index dbf27ee..1232abf 100644 --- a/lib/psych/core_ext.rb +++ b/lib/psych/core_ext.rb @@ -14,19 +14,6 @@ class Object end end -<<<<<<< HEAD -class Module - def yaml_as url - return if caller[0].end_with?('rubytypes.rb') - if $VERBOSE - warn "#{caller[0]}: yaml_as is deprecated, please use yaml_tag" - end - Psych.add_tag(url, self) - end -end - -======= ->>>>>>> Removed Module#psych_yaml_as if defined?(::IRB) require 'psych/y' end diff --git a/lib/psych/visitors/yaml_tree.rb b/lib/psych/visitors/yaml_tree.rb index 2b61f13..cae876c 100644 --- a/lib/psych/visitors/yaml_tree.rb +++ b/lib/psych/visitors/yaml_tree.rb @@ -130,27 +130,6 @@ module Psych return @emitter.alias anchor end -<<<<<<< HEAD - if target.respond_to?(:to_yaml) - begin - loc = target.method(:to_yaml).source_location.first - if loc !~ /psych\/core_ext.rb/ - unless target.respond_to?(:encode_with) - if $VERBOSE - warn "implementing to_yaml is deprecated, please implement \"encode_with\"" - end - - target.to_yaml(:nodump => true) - end - end - rescue - # public_method or source_location might be overridden, - # and it's OK to skip it since it's only to emit a warning - end - end - -======= ->>>>>>> Removed to_yaml support on YAMLTree if target.respond_to?(:encode_with) dump_coder target else diff --git a/test/psych/test_deprecated.rb b/test/psych/test_deprecated.rb index 3961e36..eab2302 100644 --- a/test/psych/test_deprecated.rb +++ b/test/psych/test_deprecated.rb @@ -87,18 +87,5 @@ module Psych assert_equal 'some string', coder.scalar assert_equal :scalar, coder.type end -<<<<<<< HEAD - - class YamlAs - TestCase.suppress_warning do - yaml_as 'helloworld' - end - end - - def test_yaml_as - assert_match(/helloworld/, Psych.dump(YamlAs.new)) - end -======= ->>>>>>> Removed Module#psych_yaml_as end end |