#322 √ hold
Le Huy

[BUG] Symbol#to_yaml returns incorrect result

Reported by Le Huy | February 12th, 2008 @ 12:14 AM | in 1.0 preview

huy@huy-desktop:/u01/rubinius/code$ ./shotgun/rubinius
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> :a.to_yaml
=> "--- !!str :a\n"
irb(main):003:0> 

while in mri the symbol is write out correctly

huy@huy-desktop:/u01/rubinius/code$ irb
irb(main):001:0> require 'yaml'
=> true
irb(main):002:0> :a.to_yaml
=> "--- :a\n"
irb(main):003:0>

Comments and changes to this ticket

  • kwatch

    kwatch February 12th, 2008 @ 02:20 AM

    I guess that this is due to the difference of RbYAML and Syck.

    RbYAML seems not to be maintained recently.

    In addition, it has a dozen of bugs.

  • Ryan Davis

    Ryan Davis February 29th, 2008 @ 04:01 PM

    • → State changed from “new” to “open”
    • → Assigned user changed from “” to “Wilson Bilkovich”

    kwatch, please file any and all bugs you know about.

  • Wilson Bilkovich

    Wilson Bilkovich March 13th, 2008 @ 05:06 PM

    • → State changed from “open” to “hold”

    I spent a while on this today, but I just can't figure out the crazy pile of crap that is RbYAML.

    It appears to occur somewhere in/near lib/rbyaml/serializer.rb's implemenation of 'serialize_node'

    The 'default tag' for Symbol is 'str', so the emitter code prefixes the stream with that.

    I have no idea whether that is a correct 'default tag' for Symbol, however.

    Someone with my YAML experience may need to look at this.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Tags