summaryrefslogtreecommitdiff
path: root/ext/psych/lib/psych/deprecated.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/psych/lib/psych/deprecated.rb')
-rw-r--r--ext/psych/lib/psych/deprecated.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/psych/lib/psych/deprecated.rb b/ext/psych/lib/psych/deprecated.rb
index 1d401d920fc..dd4ca6b68f3 100644
--- a/ext/psych/lib/psych/deprecated.rb
+++ b/ext/psych/lib/psych/deprecated.rb
@@ -56,6 +56,16 @@ module Psych
return thing unless String === thing
"tag:yaml.org,2002:#{thing}"
end
+
+ def self.read_type_class type, reference
+ warn "#{caller[0]}: read_type_class is deprecated" if $VERBOSE
+ _, _, type, name = type.split ':', 4
+
+ reference = name.split('::').inject(reference) do |k,n|
+ k.const_get(n.to_sym)
+ end if name
+ [type, reference]
+ end
end
class Object