Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #2304 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] YAML Changes in Ruby 1.8.3 cause badness in AR serialization

Reported by: htonl Assigned to: scott
Priority: high Milestone:
Component: ActiveRecord Version: 0.13.1
Severity: major Keywords: ruby 1.8.3
Cc:

Description

In Ruby 1.8.3, YAML no longer inserts the "--- \n" header, so the serialization routines that check for this header are failing.

This patch removes that check and just tries to YAML::load the string, which will fail anyway if it's not real YAML.

The test_quote test was changed to verify quoting on a non-serialized column, otherwise this field will be pumped through YAML::load and distorted, causing the test to fail. I'm mostly convinced that that's the way it should all work, please leave comments if you feel otherwise.

Attachments

yaml-1.8.3.diff (1.4 kB) - added by htonl on 09/26/05 01:22:53.
Patch for #2304

Change History

09/26/05 01:22:53 changed by htonl

  • attachment yaml-1.8.3.diff added.

Patch for #2304

09/27/05 02:01:57 changed by bitsweat

This looks good to me, though I'd like to know why YAML changed.

09/27/05 09:25:39 changed by htonl

  • status changed from new to closed.
  • resolution set to fixed.

Fixed in [2360].