Changeset 225 for trunk/ext

Show
Ignore:
Timestamp:
09/20/2005 00:21:06 (3 years ago)
Author:
why
Message:

ext/ruby/ext/syck/rubyext.c: round-tripping of implicit symbols.
lib/*.c: fix warnings during -Wall.
lib/emitter.c: make sure scalars with indicators at conclusion get quoted.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ext/ruby/lib/yaml/rubytypes.rb

    r224 r225  
    165165                out.scalar( "tag:yaml.org,2002:binary", [self].pack("m"), :literal ) 
    166166            elsif to_yaml_properties.empty? 
    167                 out.scalar( taguri, self, to_yaml_style ) 
     167                out.scalar( taguri, self, self =~ /^:/ ? :quote2 : to_yaml_style ) 
    168168            else 
    169169                out.map( taguri, to_yaml_style ) do |map| 
     
    181181    yaml_as "tag:ruby.yaml.org,2002:symbol" 
    182182    yaml_as "tag:ruby.yaml.org,2002:sym" 
    183         # yaml_implicit /^:/, :yaml_new 
    184183    def Symbol.yaml_new( klass, tag, val ) 
    185184        if String === val