diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 4 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,8 @@ +Thu May 16 01:25:07 2013 Aaron Patterson <aaron@tenderlovemaking.com> + + * ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when + -w is enabled. + Wed May 15 18:58:17 2013 Koichi Sasada <ko1@atdot.net> * gc.c (newobj): rename to `newobj_of' and accept additional diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index bb5331ce4c..a9f8df9e60 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -50,7 +50,9 @@ module Psych 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})" + if $VERBOSE + warn "This API is deprecated, please pass an emitter, scalar scanner, and options or call #{self.class}.create() (#{caller.first})" + end create emitter, ss end |