ruby-changes:28701
From: tenderlove <ko1@a...>
Date: Wed, 15 May 2013 03:57:35 +0900 (JST)
Subject: [ruby-changes:28701] tenderlove:r40753 (trunk): * ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards
tenderlove 2013-05-15 03:57:23 +0900 (Wed, 15 May 2013) New Revision: 40753 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40753 Log: * ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards compatible YAMLTree.new method Modified files: trunk/ChangeLog trunk/ext/psych/lib/psych/visitors/yaml_tree.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 40752) +++ ChangeLog (revision 40753) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed May 15 03:56:09 2013 Aaron Patterson <aaron@t...> + + * ext/psych/lib/psych/visitors/yaml_tree.rb: adding backwards + compatible YAMLTree.new method + Wed May 15 02:22:16 2013 Aaron Patterson <aaron@t...> * ext/psych/lib/psych.rb: Adding Psych.safe_load for loading a user Index: ext/psych/lib/psych/visitors/yaml_tree.rb =================================================================== --- ext/psych/lib/psych/visitors/yaml_tree.rb (revision 40752) +++ ext/psych/lib/psych/visitors/yaml_tree.rb (revision 40753) @@ -47,6 +47,13 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych/visitors/yaml_tree.rb#L47 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/