summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-15 16:25:39 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-15 16:25:39 +0000
commit4616913dc5a23132bafe60ea36d07bd3b440316f (patch)
tree3a1499a72dad0f6102006b5c47529b5abd3601fc /ext/psych
parentdec4e1cd2db6c11143900f017c8d6453a33c1161 (diff)
* ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when
-w is enabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych/visitors/yaml_tree.rb4
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