summaryrefslogtreecommitdiff
path: root/ext/psych
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 22:27:55 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-24 22:27:55 +0000
commit63578c725c481abf246b1c1e5b4ddf2942cb5508 (patch)
tree193ac4b5a2453a8a69b7dc34ba77d3f647017fb4 /ext/psych
parent38297f330b41702e07460d18e6fac3f989a06a9a (diff)
downloadruby-63578c725c481abf246b1c1e5b4ddf2942cb5508.tar.gz
* ext/psych/lib/psych/deprecated.rb: adding deprecated tagurize method
* test/psych/test_deprecated.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/psych')
-rw-r--r--ext/psych/lib/psych/deprecated.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/deprecated.rb b/ext/psych/lib/psych/deprecated.rb
index b306b85bce..1d401d920f 100644
--- a/ext/psych/lib/psych/deprecated.rb
+++ b/ext/psych/lib/psych/deprecated.rb
@@ -50,6 +50,12 @@ module Psych
key = [domain, type_tag].join ':'
@domain_types[key] = [key, block]
end
+
+ def self.tagurize thing
+ warn "#{caller[0]}: add_private_type is deprecated, use add_domain_type" if $VERBOSE
+ return thing unless String === thing
+ "tag:yaml.org,2002:#{thing}"
+ end
end
class Object