Skip to content

Commit e559623

Browse files
committed
remove sql and bindings params from NoDatabaseError initialization
Fixes: ``` SQLServerRakeDropTest#test_0002_prints error message when database does not exist: ArgumentError: unknown keywords: :sql, :binds ``` `NoDatabaseError` extends `InvalidStatement` which support :sql and :binds keywords but [this commit](rails/rails@b28711f) declare initialize method without them.
1 parent 97b3262 commit e559623

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ def translate_exception(e, message:, sql:, binds:)
467467
when /has been chosen as the deadlock victim/i
468468
DeadlockVictim.new(message, sql: sql, binds: binds)
469469
when /database .* does not exist/i
470-
NoDatabaseError.new(message, sql: sql, binds: binds)
470+
NoDatabaseError.new(message)
471471
when /data would be truncated/
472472
ValueTooLong.new(message, sql: sql, binds: binds)
473473
when /connection timed out/

0 commit comments

Comments
 (0)