From b847ca06bf3f5026a8e9ee31fd0daea4436832e6 Mon Sep 17 00:00:00 2001 From: naruse Date: Mon, 5 Apr 2010 02:42:37 +0000 Subject: Don't warn when YAML.quick_emit is called by Object#to_yaml. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/syck/lib/syck.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ext/syck/lib/syck.rb b/ext/syck/lib/syck.rb index 0f43c139bc..2fc60c17e9 100644 --- a/ext/syck/lib/syck.rb +++ b/ext/syck/lib/syck.rb @@ -397,7 +397,9 @@ module Syck # Allocate an Emitter if needed # def self.quick_emit( oid, opts = {}, &e ) - warn "#{caller[0]}: YAML.quick_emit is deprecated" if $VERBOSE + if $VERBOSE && /syck\/rubytypes\.rb:\d+:in `to_yaml'/ !~ caller[0] + warn "#{caller[0]}: YAML.quick_emit is deprecated" + end out = if opts.is_a? Emitter opts -- cgit v1.2.3