summaryrefslogtreecommitdiff
path: root/lib/yaml/rubytypes.rb
diff options
context:
space:
mode:
authorwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-22 05:41:06 +0000
committerwhy <why@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-22 05:41:06 +0000
commit5e1c96af5323f757c9875ea1fb5b754e4dd257cd (patch)
tree22bbba2734e272dfcc0c3a452358aeb23fc17929 /lib/yaml/rubytypes.rb
parenta2cd1bbf3e70dfa1be172851ffd4b6bad3190560 (diff)
* ext/syck/rubyext.c (syck_parser_load): root-level false was returning
nil. * ext/syck/token.c: root-level transfer method bug. * ext/syck/gram.c: root-level empty gave a parse error. * lib/yaml/rubytypes.rb: Symbol#to_yaml generating method call error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/yaml/rubytypes.rb')
-rw-r--r--lib/yaml/rubytypes.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/yaml/rubytypes.rb b/lib/yaml/rubytypes.rb
index 666618e49c..ae5585db5d 100644
--- a/lib/yaml/rubytypes.rb
+++ b/lib/yaml/rubytypes.rb
@@ -3,6 +3,12 @@ require 'date'
# Type conversions
#
+class Class
+ def to_yaml( opts = {} )
+ raise ArgumentError, "can't dump anonymous class %s" % self.class
+ end
+end
+
class Object
def is_complex_yaml?
true
@@ -300,7 +306,7 @@ class Symbol
def to_yaml( opts = {} )
YAML::quick_emit( nil, opts ) { |out|
out << "!ruby/sym "
- self.object_id2name.to_yaml( :Emitter => out )
+ self.id2name.to_yaml( :Emitter => out )
}
end
end