Commit 6b1c4ae
Drop
The guard was added in 2008 (8f5029c, "Adapted spec tests so that
they run both on Rails 2.1.0 and Rails 2.0.2") because Rails 2.0.2
did not yet have `partial_updates=`. The setter then went through
two more renames in upstream Rails:
- Rails ~3.x renamed `partial_updates` → `partial_writes` (the
spec was tracked through 7d1a4ba here).
- rails/rails#42355 (Rails 7.0) deprecated `partial_writes` in
favor of `partial_updates` / `partial_inserts`. PR #2189 here
flipped the spec back to `partial_updates =` and kept the
`rescue nil` as a precaution while Rails was in transition.
oracle-enhanced now depends on `activerecord ~> 8.2.0.alpha`. On
Rails 8 `partial_writes=` has been removed entirely and
`partial_updates=` is the stable public API:
irb> ActiveRecord::Base.respond_to?(:partial_writes=) #=> false
irb> ActiveRecord::Base.respond_to?(:partial_updates=) #=> true
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>rescue nil guard for partial_updates =
1 parent 9fedcdd commit 6b1c4ae
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
| 319 | + | |
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
| |||
0 commit comments