1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/syck/syck.c (syck_new_parser): clear parser on init.

thanks, ts. [ruby-core:02931]

* ext/syck/token.c (sycklex_yaml_utf8): buffer underflow.
  thanks, ts. [ruby-core:02929]

* lib/yaml/baseemitter.rb (indent_text): simpler flow block code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
why 2004-05-25 14:57:25 +00:00
parent 82572952ec
commit ca1dca02b0
5 changed files with 24 additions and 25 deletions

View file

@ -392,7 +392,9 @@ class Range
end
def to_yaml( opts = {} )
YAML::quick_emit( self.object_id, opts ) { |out|
if self.begin.is_complex_yaml? or self.end.is_complex_yaml? or not to_yaml_properties.empty?
if self.begin.is_complex_yaml? or self.begin.respond_to? :to_str or
self.end.is_complex_yaml? or self.end.respond_to? :to_str or
not to_yaml_properties.empty?
out.map( to_yaml_type ) { |map|
map.add( 'begin', self.begin )
map.add( 'end', self.end )