rails/rails — pull request #11245 by hubertlepicki (2013-07-02 11:47:55+00:00)
Title: Postgres arrays improvements

I have stumbled upon some problems with integer arrays. One of them was this: https://github.com/rails/rails/pull/10340

Error: "undefined method `gsub' for 1:Fixnum" was happening in my *production* app on 4.0.0.beta1 as well as 4.0.0 when updating integer array columns.

The other issue was with multi-dimensional arrays: they did not work with integer array columns.

@Skile9 's commit fixes the first issue, but it was lacking the tests, and it was actualy breaking multidimensional string arrays by accident. So my second commit adds the tests and fixes the regression that could be caused by @Silke9 's patch alone.