--1y+zdtdBnEHWVLHCvQz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Hey,

I have some data that I output with YAML and read back in. I use these
for hashing. So It would be necessary that the read value is exactly the
same as the outputted value. But this is sometimes not the case.

The data is complex as it is a hash with an array of strings as keys and
an array of strings as values.

Now I wonder if this is an error or just my misunderstanding of YAML.

Here is the source code reproducing the error with the data file
attached.

I am using Marshal now again, as in my case it reproduces the data
exactly.

require 'yaml'
require 'pp'

# read the data with marshal
data1  il
File.open( "marshal", "r") {|file|
  data1  arshal.load( file )
}

# write and read with yaml
data2  AML.load data1.to_yaml
puts data1 data2  # false

# put differences
File.open( "data1", "w") { |file|
  PP.pp data1, file
}
File.open( "data2", "w") { |file|
  PP.pp( data2, file )
}

system "diff data1 data2"

--1y+zdtdBnEHWVLHCvQz
Content-Disposition: attachment; filename="marshal"
Content-Type: application/octet-stream; name="marshal"
Content-Transfer-Encoding: base64

BAhbB1sJewgiDmZyb250LnRleCIGCiIPaGVhZGVyLnRleCIC7QRcdXNlcGFja2FnZVt1dGY4XXtp
bnB1dGVuY30KXHVzZXBhY2thZ2V7YW1zZm9udHN9Clx1c2VwYWNrYWdle2Ftc21hdGh9Clx1c2Vw
YWNrYWdle2Ftc3N5bWJ9Clx1c2VwYWNrYWdle2Ftc3RobX0KXHVzZXBhY2thZ2Vbbmdlcm1hbl17
YmFiZWx9Clx1c2VwYWNrYWdlW1QxXXtmb250ZW5jfQoKClxuZXdjb21tYW5ke1xNZFJ9e1xlbnN1
cmVtYXRoe1xtYXRoYmJ7Un19fQpcbmV3Y29tbWFuZHtcTWRDfXtcZW5zdXJlbWF0aHtcbWF0aGJi
e0N9fX0KXG5ld2NvbW1hbmR7XE1kTn17XGVuc3VyZW1hdGh7XG1hdGhiYntDfX19ClxuZXdjb21t
YW5ke1xkZWZpbml0aW9ufVsyXXsjMSBcZW5zdXJlbWF0aHs6PX0gIzJ9ClxuZXdjb21tYW5ke1xz
Y2hyZWlid2Vpc2V9WzJdeyMxIF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