They are not random characters.
mkdir tmp
cd tmp
git clone git://
github.com/rails/rails.gitgrep -r \\-\\-\\- *
Notice things like:
execute <<_SQL
CREATE TABLE defaults (
id serial primary key,
modified_date date default CURRENT_DATE,
modified_date_function date default now(),
fixed_date date default '2004-01-01',
modified_time timestamp default CURRENT_TIMESTAMP,
modified_time_function timestamp default now(),
fixed_time timestamp default '2004-01-01 00:00:00.000000-00',
char1 char(1) default 'Y',
char2 character varying(50) default 'a varchar field',
char3 text default 'a text field',
positive_integer integer default 1,
negative_integer integer default -1,
bigint_default bigint default 0::bigint,
decimal_number decimal(3,2) default 2.78,
multiline_default text DEFAULT '--- []
'::text
);
_SQL
See that multiline_default? Then a google search for: rails multiline_default shows this commit:
https://github.com/rails/rails/commit/4eaa8ba5bec9001e97349e7dfd565c7215085834Maybe that has something to do with it? Maybe shouldn't be raising an error because some might be using that? I don't know.
Maybe you could add something so that this is supported:
MyModel.where([:a, :b] => [[1,2],[3,4]])
MyModel.where([:a, :nice, :triple] => [[1,2,3],[4,5,6]])
MyModel.where([:any, :number, :of, :members] => [[1,2,3,4],[5,6,7,8]])
but if you did:
MyModel.where([:a, :b] => [[1,2],[3,[4,5]]])
maybe the [4,5] would render as the wierd multiline string version of the array for that specific part of the tuple's second value.
I'm not sure whether that would break anything, but if it did then could just have a different method name like where_tuple(...) to do that.