I believe this is a YAML bug, or at least a place that needs a more
useful error message.  When I define a Hash with a custom key type,
YAML has trouble.  The following code should demonstrate the problem:

class X;
  def initialize(foo)
    @foo = foo;
  end;
end;

YAML::load({X.new("bar") => "sailor" }.to_yaml)
# =>
ArgumentError: syntax error on line 2, col -1: `  foo: bar
: sailor

'
        from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
        from /usr/lib/ruby/1.8/yaml.rb:133:in `load'
        from (irb):15
        from :0

I'd appreciate any help in getting this to work. If this is truly a
bug, perhaps somebody can tell me how to report it.