diff options
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 1 | ||||
-rw-r--r-- | activerecord/test/schema/postgresql_specific_schema.rb | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index a1e0704aa4..c49aed7069 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -4,6 +4,7 @@ module ActiveRecord # Converts an arel AST to SQL def to_sql(arel, binds = []) if arel.respond_to?(:ast) + binds = binds.dup visitor.accept(arel.ast) do quote(*binds.shift.reverse) end diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index 35e12b1875..b2c655ddcd 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -133,9 +133,9 @@ _SQL rescue #This version of PostgreSQL either has no XML support or is was not compiled with XML support: skipping table end - create_table :limitless_fields, force: true do |t| - t.binary :binary, limit: 100_000 - t.text :text, limit: 100_000 + create_table :limitless_fields, :force => true do |t| + t.binary :binary, :limit => 100_000 + t.text :text, :limit => 100_000 end end |