luislavena/sqlite3-ruby — pull request #69 by trptcolin (2012-06-15 03:28:20+00:00)
Title: Handle trailing newline in default strings

I ran into this when trying to use ActiveRecord's Array serialization. Since the `tweak_default` regexes were only matching against non-newline characters, newlines in the default value for a string column mean you get hosed with `ActiveRecord::SerializationTypeMismatch`. This is since sqlite3 thinks the default value is `"'--- []\n'"` instead of `"--- []\n"`.

I'm happy to change things about this patch if there are tweaks :trollface: you'd like to see. Let me know.