summaryrefslogtreecommitdiff
path: root/ext/syck
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-05 02:42:37 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-05 02:42:37 +0000
commitb847ca06bf3f5026a8e9ee31fd0daea4436832e6 (patch)
treea0fe0453b4d436908107d2827d915a8056753cba /ext/syck
parent563cd015e5c0a03cc3f343a55a18f938fd234070 (diff)
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
Diffstat (limited to 'ext/syck')
-rw-r--r--ext/syck/lib/syck.rb4
1 files changed, 3 insertions, 1 deletions
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