YAML dumping or loading is mucking up object IDs
------------------------------------------------
Key: JRUBY-1471
URL: http://jira.codehaus.org/browse/JRUBY-1471
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.0.1
Reporter: Charles Oliver Nutter
Assignee: Ola Bini
Priority: Critical
Fix For: JRuby 1.0.2, JRuby 1.1.0
Run the following snippit and see that JRuby reconstitutes the objects with the
same object ID:
{noformat}
require 'yaml'
class YamlTest
def initialize()
@test = Hash.new
@test["hello"] = "foo"
end
end
list = Array.new
list << YamlTest.new
list << YamlTest.new
list << YamlTest.new
list.each do |x|
p x.object_id
end
ylist = YAML.dump(list)
yamlstr = YAML.load(ylist)
yamlstr.each do |x|
p x.object_id
end
{noformat}
In MRI, they come back with different IDs.
--
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