mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
a2cd1bbf3e
commit
5e1c96af53
5 changed files with 132 additions and 119 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue