summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 18:57:23 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-14 18:57:23 +0000
commit3f51cff4f9c3babdc0d641ffa8467ceabe5a5e26 (patch)
tree3e5f302fa54a9ace1ee02ad90d70b9158a58ec30 /ext/psych
parent9ecdb32144243d3bc8b8cf37cd3c44d003ef120e (diff)
* ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards
compatible YAMLTree.new method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb
index ddd745b34a..bb5331ce4c 100644
--- a/ext/psych/lib/psych/visitors/yaml_tree.rb
+++ b/ext/psych/lib/psych/visitors/yaml_tree.rb
@@ -47,6 +47,13 @@ module Psych
new(emitter, ss, options)
end
+ def self.new emitter = nil, ss = nil, options = nil
+ return super if emitter && ss && options
+
+ warn "This API is deprecated, please pass an emitter, scalar scanner, and options or call #{self.class}.create() (#{caller.first})"
+ create emitter, ss
+ end
+
def initialize emitter, ss, options
super()
@started = false