Skip to content

Commit dc581fb

Browse files
yahondaclaude
andcommitted
Drop rescue nil guard for partial_updates =
`(TestEmployee.partial_updates = false) rescue nil` was a defensive guard for an ActiveRecord API that may not have existed on every supported Rails version when the line was written. `ActiveRecord::Base.partial_updates=` is stable in Rails 8 and is present on the supported Rails range, so the guard hides nothing useful — and a future API rename would be better surfaced as a NoMethodError than silently swallowed. Drop the guard so the assignment runs unconditionally; if the API ever goes away the spec will fail loudly instead of silently no-opping. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent 9068dfa commit dc581fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

spec/active_record/connection_adapters/oracle_enhanced/procedures_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def raise_make_transaction_rollback
316316
end
317317

318318
it "should log update record" do
319-
(TestEmployee.partial_updates = false) rescue nil
319+
TestEmployee.partial_updates = false
320320
@employee = TestEmployee.create(
321321
first_name: "First",
322322
last_name: "Last",

0 commit comments

Comments
 (0)