Joel VanderWerf wrote:

> [#9518] YAML: Derived String and binary data. [verified]

Here's a quick fix (also posted on the bug page):

--- rubytypes.rb.bck    2007-11-03 15:53:56.000000000 -0700
+++ rubytypes.rb        2007-11-03 15:53:56.000000000 -0700
@@ -163,7 +163,7 @@
         def to_yaml( opts = {} )
                 YAML::quick_emit( is_complex_yaml? ? object_id : nil, opts ) do |out|
              if is_binary_data?
-                out.scalar( "tag:yaml.org,2002:binary", [self].pack("m"), :literal )
+                out.scalar( taguri.sub(/:str:/, ":binary:"), [self].pack("m"), :literal )
              elsif to_yaml_properties.empty?
                  out.scalar( taguri, self, self =~ /^:/ ? :quote2 : to_yaml_style )
              else

Btw, there is also a bug with binary strings that have instance
variables, but one at a time...

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407