From: Aaron Schrab Date: 2005-09-24T04:01:23+09:00 Subject: Re: Outputting custom YAML types in 1.8.3 At 01:07 +0900 24 Sep 2005, why the lucky stiff wrote: > The out.map now takes YAML taguris. Try: > > YAML::quick_emit( YAML.tagurize( to_yaml_type[1..-1] ) ) Presumably you mean to use that argument when calling map on the emitter. That works with 1.8.3, but since the YAML class included in previous versions of ruby doesn't respond to the tagurize method it won't work there. So to be compatible I guess I'll just have to do something like: yaml_type = to_yaml_type yaml_type = YAML.tagurize(yaml_type[1..-1]) if YAML.respond_to? :tagurize out.map(yaml_type) > Or I would recommend switching to taguris completely in your code. > > def to_yaml_type; "tag:example.com,2005:Foo"; end That also won't work properly with older versions. > The long string of dashes at the beginning isn't required in YAML 1.0, > so I've decided to default to headless. Yeah, I don't really care about that. I really only noticed it when comparing the ouput to older versions because of the other issue. -- Aaron Schrab aaron@schrab.com http://www.schrab.com/aaron/ As I look across the web, what I find is this vast wasteland that makes television almost attractive. -- Clifford Stoll