YAML parser do not escape nested yaml string correctly
------------------------------------------------------

                 Key: JRUBY-1169
                 URL: http://jira.codehaus.org/browse/JRUBY-1169
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
         Environment: WindowsXP SP2, Mac OSX 10.4, JDK6
            Reporter: WPC
            Priority: Blocker


Looks like the yaml serilization has some problem when there is a nested yaml 
serialized string


require 'test/unit'
require 'active_support'
require 'yaml'

class TestRoundTripSerialization < Test::Unit::TestCase
  def test_roundtrip_serialization_with_yaml
    hash = HashWithIndifferentAccess.new
    hash['kind'] = 'human'
    need_to_be_serialized = {:first => 'something', :second_params => hash}
    a = {:x => need_to_be_serialized.to_yaml}
    assert_equal need_to_be_serialized, YAML.load(YAML.load(a.to_yaml)[:x])
  end
end

This testcase failed both on macos and windows xp.  But the behavior is kind of 
differen on two platform.  Sometime I got extra '\' on the serialized yaml 
string on windows.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to