Skip to content

Commit 573bd78

Browse files
committed
Fix Ruby 2.7 deprecation warnings
1 parent 855abc9 commit 573bd78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/database_cleaner/cleaners.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ def initialize hash={}
77
end
88

99
# FIXME this method conflates creation with lookup... both a command and a query. yuck.
10-
def [](orm, opts = {})
10+
def [](orm, **opts)
1111
raise ArgumentError if orm.nil?
12-
fetch([orm, opts]) { add_cleaner(orm, opts) }
12+
fetch([orm, opts]) { add_cleaner(orm, **opts) }
1313
end
1414

1515
def strategy=(strategy)
@@ -37,8 +37,8 @@ def clean_with(*args)
3737

3838
private
3939

40-
def add_cleaner(orm, opts = {})
41-
self[[orm, opts]] = Cleaner.new(orm, opts)
40+
def add_cleaner(orm, **opts)
41+
self[[orm, opts]] = Cleaner.new(orm, **opts)
4242
end
4343

4444
def remove_duplicates

0 commit comments

Comments
 (0)