[前][次][番号順一覧][スレッド一覧]

ruby-changes:28717

From: tenderlove <ko1@a...>
Date: Thu, 16 May 2013 01:25:51 +0900 (JST)
Subject: [ruby-changes:28717] tenderlove:r40769 (trunk): * ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when

tenderlove	2013-05-16 01:25:39 +0900 (Thu, 16 May 2013)

  New Revision: 40769

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40769

  Log:
    * ext/psych/lib/psych/visitors/yaml_tree.rb: only emit warnings when
      -w is enabled.

  Modified files:
    trunk/ChangeLog
    trunk/ext/psych/lib/psych/visitors/yaml_tree.rb

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 40768)
+++ ChangeLog	(revision 40769)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu May 16 01:25:07 2013  Aaron Patterson <aaron@t...>
+
+	* 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@a...>
 
 	* gc.c (newobj): rename to `newobj_of' and accept additional
Index: ext/psych/lib/psych/visitors/yaml_tree.rb
===================================================================
--- ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 40768)
+++ ext/psych/lib/psych/visitors/yaml_tree.rb	(revision 40769)
@@ -50,7 +50,9 @@ module Psych https://github.com/ruby/ruby/blob/trunk/ext/psych/lib/psych/visitors/yaml_tree.rb#L50
       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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]