Skip to content

Commit

Permalink
Refine ActiveRecord::Base instead of Object
Browse files Browse the repository at this point in the history
Don't refine classes that it isn't necessary.
As a technical issue, overriding Object#dup causes a problem of stopping
`ActiveRecord::Base.establish_connection` in Ruby 3.0.
I will try to continue to investigate this issue.
  • Loading branch information
alpaca-tc committed Jan 22, 2021
1 parent f6e662f commit 06b18c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/activerecord-bitemporal/bitemporal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ def update_transaction_to(value)
end
end

refine Object do
refine ActiveRecord::Base do
# MEMO: Do not copy `swapped_id`
def dup(*)
super.tap { |itself|
Expand Down

0 comments on commit 06b18c8

Please sign in to comment.