funny-falcon/activerecord-postgresql-arrays — pull request #4 by toots (2012-02-10 20:26:07+00:00)
Title: Concat failling

Hi,

We've been having a lot of troubles using this module. I've tracked down at least one issue to the fact that array data is not cached.

When not cached, AR read call re-parse the string data into a fresh array each time, which results in a fresh array generated to each read. Relevant instance variables are `@atttributes` and `@attributes_cache` (See `instance_variable_get` to have a sneak peek.

I have been able to force caching of those values, which solved part of the issue but was not able to fix the save part.

Thus, I am submitting this additional spec test, which should convince you of the issue:

```
Failures:

1) PgArray AR should save concatenate changes
Failure/Error: bulk.ints.should == [2, 3, 4]
expected: [2, 3, 4]
got: [3, 2] (using ==)
Diff:
@@ -1,2 +1,2 @@
-[2, 3, 4]
+[3, 2]
# ./spec/pg_array_spec.rb:110:in `block (3 levels) in '

Finished in 12.04 seconds
20 examples, 1 failure
```