summaryrefslogtreecommitdiff
path: root/ext/syck/lib/syck/tag.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 20:31:59 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-16 20:31:59 +0000
commit5b5bbdbb35098e8e2dabe7af5d31526a54dc8bbd (patch)
treeb13a953eeabb87fbce34ecb67818b24164ca8298 /ext/syck/lib/syck/tag.rb
parent2db7b7f3fe7de2b518d46ea11c26875f86d26136 (diff)
* ext/psych/lib/psych/core_ext.rb (yaml_as): supporting deprecated
"yaml_as" method * ext/syck/lib/syck/tag.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27365 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/syck/lib/syck/tag.rb')
-rw-r--r--ext/syck/lib/syck/tag.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/syck/lib/syck/tag.rb b/ext/syck/lib/syck/tag.rb
index bfb4dc714d..9c6de57953 100644
--- a/ext/syck/lib/syck/tag.rb
+++ b/ext/syck/lib/syck/tag.rb
@@ -56,7 +56,7 @@ class Module
# Adds a taguri _tag_ to a class, used when dumping or loading the class
# in YAML. See YAML::tag_class for detailed information on typing and
# taguris.
- def yaml_as( tag, sc = true )
+ def syck_yaml_as( tag, sc = true )
verbose, $VERBOSE = $VERBOSE, nil
class_eval <<-"END", __FILE__, __LINE__+1
attr_writer :taguri
@@ -78,6 +78,9 @@ class Module
ensure
$VERBOSE = verbose
end
+ remove_method :yaml_as rescue nil
+ alias :yaml_as :syck_yaml_as
+
# Transforms the subclass name into a name suitable for display
# in a subclassed tag.
def yaml_tag_class_name