diff options
Diffstat (limited to 'ext/psych/lib/psych/visitors/yaml_tree.rb')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 4 |
1 files changed, 3 insertions, 1 deletions
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 |